changeset 9680:8cea86d73887

lock: use '==' instead of 'is' for integer equality ('is' may not work)
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sat, 31 Oct 2009 17:07:12 +0100
parents a1943c2a4661
children ac3a68cb16eb
files mercurial/lock.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/lock.py	Sat Oct 31 17:04:46 2009 +0100
+++ b/mercurial/lock.py	Sat Oct 31 17:07:12 2009 +0100
@@ -122,7 +122,7 @@
     def release(self):
         if self.held > 1:
             self.held -= 1
-        elif self.held is 1:
+        elif self.held == 1:
             self.held = 0
             if self.releasefn:
                 self.releasefn()