Mercurial > hg > mercurial-source
diff mercurial/scmutil.py @ 14962:5523529bd1af
walkrepos: use getattr instead of hasattr for samestat
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Mon, 25 Jul 2011 15:45:11 -0500 (2011-07-25) |
parents | dca59d5be12d |
children | cc2c22511707 |
line wrap: on
line diff
--- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -324,10 +324,10 @@ def errhandler(err): if err.filename == path: raise err - if followsym and hasattr(os.path, 'samestat'): + samestat = getattr(os.path, 'samestat', None) + if followsym and samestat is not None: def adddir(dirlst, dirname): match = False - samestat = os.path.samestat dirstat = os.stat(dirname) for lstdirstat in dirlst: if samestat(dirstat, lstdirstat):