[133046] contrib/pypi2port/pypi2port

mojca at macports.org mojca at macports.org
Wed Feb 18 15:24:45 PST 2015


Revision: 133046
          https://trac.macports.org/changeset/133046
Author:   mojca at macports.org
Date:     2015-02-18 15:24:45 -0800 (Wed, 18 Feb 2015)
Log Message:
-----------
pypi2port: fix syntax for exceptions

Modified Paths:
--------------
    contrib/pypi2port/pypi2port

Modified: contrib/pypi2port/pypi2port
===================================================================
--- contrib/pypi2port/pypi2port	2015-02-18 23:06:14 UTC (rev 133045)
+++ contrib/pypi2port/pypi2port	2015-02-18 23:24:45 UTC (rev 133046)
@@ -125,7 +125,7 @@
         print ('Aborting due to inconsistency on checksums\n')
         try:
             os.remove(file_name)
-        except (OSError, e):
+        except OSError as e:
             print ("Error: {:s} - {:s}.".format(e.filename, e.strerror))
         return False
 
@@ -225,7 +225,7 @@
         existing_portfile = \
             subprocess.check_output(command, stderr=subprocess.STDOUT).strip()
         return existing_portfile
-    except (Exception, e):
+    except Exception as e:
         return False
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150218/df88082a/attachment-0001.html>


More information about the macports-changes mailing list