mercurial/hg.py
changeset 25660 328739ea70c3
parent 25624 f0745da75056
child 25761 0d37b9b21467
--- a/mercurial/hg.py	Tue Jun 23 22:38:21 2015 -0700
+++ b/mercurial/hg.py	Tue Jun 23 22:20:08 2015 -0700
@@ -202,7 +202,7 @@
     requirements = ''
     try:
         requirements = srcrepo.vfs.read('requires')
-    except IOError, inst:
+    except IOError as inst:
         if inst.errno != errno.ENOENT:
             raise
 
@@ -388,7 +388,7 @@
             try:
                 destpath = hgdir
                 util.makedir(destpath, notindexed=True)
-            except OSError, inst:
+            except OSError as inst:
                 if inst.errno == errno.EEXIST:
                     cleandir = None
                     raise util.Abort(_("destination '%s' already exists")
@@ -428,7 +428,7 @@
             try:
                 destpeer = peer(srcrepo or ui, peeropts, dest, create=True)
                                 # only pass ui when no srcrepo
-            except OSError, inst:
+            except OSError as inst:
                 if inst.errno == errno.EEXIST:
                     cleandir = None
                     raise util.Abort(_("destination '%s' already exists")