# HG changeset patch # User Dan Villiom Podlaski Christiansen # Date 2010-11-16 20:35:58 # Node ID e98bf69480923c3014c9ed33f4abbf43d41a6936 # Parent ea68947ad0ce9ced3d62f716ebb75c6a95877a39 posix: remove is-comparison between integers Comparing integers by identity relies on a CPython implementation detail of caching integers between -5 and 256.[1] [1] diff --git a/mercurial/posix.py b/mercurial/posix.py --- a/mercurial/posix.py +++ b/mercurial/posix.py @@ -144,7 +144,7 @@ if sys.platform == 'darwin': try: fd = os.open(path, O_SYMLINK) except OSError, err: - if err.errno is errno.ENOENT: + if err.errno == errno.ENOENT: return path raise