action_sync: use new python3.2 compatible exception handling style
authorGregory M. Turner <gmturner007@ameritech.net>
Thu, 6 Sep 2012 18:12:36 +0000 (20:12 +0200)
committerFabian Groffen <grobian@gentoo.org>
Thu, 6 Sep 2012 18:12:36 +0000 (20:12 +0200)
Signed-off-by: Gregory M. Turner <gmturner007@ameritech.net>
pym/_emerge/actions.py

index 17aed729a2d2fc054e69b4068a6047e8574d25a6..ae8df10cb17de97355076440535d7dff4c021949 100644 (file)
@@ -2475,7 +2475,7 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
                                sys.exit(1)
                        try:
                                os.rmdir(myportdir)
-                       except OSError, e:
+                       except OSError as e:
                                if e.errno != errno.ENOENT:
                                        sys.stderr.write(
                                                "!!! existing '%s' directory; exiting.\n" % myportdir)
@@ -2501,7 +2501,7 @@ def action_sync(settings, trees, mtimedb, myopts, myaction):
                        f.write(time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime()))
                        f.write('\n')
                        f.close()
-               except IOError, e:
+               except IOError as e:
                        # too bad, next time better luck!
                        pass