Mercurial > public > mercurial-scm > hg
comparison mercurial/lock.py @ 14494:1ffeeb91c55d
check-code: flag 0/1 used as constant Boolean expression
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Wed, 01 Jun 2011 12:38:46 +0200 |
parents | 95de08ffa324 |
children | 926a06f7a353 |
comparison
equal
deleted
inserted
replaced
14493:5cc7905bccc9 | 14494:1ffeeb91c55d |
---|---|
49 | 49 |
50 self.release() | 50 self.release() |
51 | 51 |
52 def lock(self): | 52 def lock(self): |
53 timeout = self.timeout | 53 timeout = self.timeout |
54 while 1: | 54 while True: |
55 try: | 55 try: |
56 self.trylock() | 56 self.trylock() |
57 return 1 | 57 return 1 |
58 except error.LockHeld, inst: | 58 except error.LockHeld, inst: |
59 if timeout != 0: | 59 if timeout != 0: |