mercurial/lock.py
changeset 25660 328739ea70c3
parent 23032 f484be02bd35
child 25956 8cd30e9277ae
--- a/mercurial/lock.py	Tue Jun 23 22:38:21 2015 -0700
+++ b/mercurial/lock.py	Tue Jun 23 22:20:08 2015 -0700
@@ -58,7 +58,7 @@
             try:
                 self.trylock()
                 return self.timeout - timeout
-            except error.LockHeld, inst:
+            except error.LockHeld as inst:
                 if timeout != 0:
                     time.sleep(1)
                     if timeout > 0:
@@ -78,7 +78,7 @@
             try:
                 self.vfs.makelock(lockname, self.f)
                 self.held = 1
-            except (OSError, IOError), why:
+            except (OSError, IOError) as why:
                 if why.errno == errno.EEXIST:
                     locker = self.testlock()
                     if locker is not None:
@@ -102,7 +102,7 @@
         """
         try:
             locker = self.vfs.readlock(self.f)
-        except (OSError, IOError), why:
+        except (OSError, IOError) as why:
             if why.errno == errno.ENOENT:
                 return None
             raise