lock: use '==' instead of 'is' for integer equality ('is' may not work)
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Sat, 31 Oct 2009 17:07:12 +0100
changeset 9680 8cea86d73887
parent 9679 a1943c2a4661
child 9681 ac3a68cb16eb
lock: use '==' instead of 'is' for integer equality ('is' may not work)
mercurial/lock.py
--- 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()