summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac/pimp.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-01-10 16:19:56 (GMT)
committerGuido van Rossum <guido@python.org>2007-01-10 16:19:56 (GMT)
commitb940e113bf90ff71b0ef57414ea2beea9d2a4bc0 (patch)
tree0b9ea19eba1e665dac95126c3140ac2bc36326ad /Lib/plat-mac/pimp.py
parent893523e80a2003d4a630aafb84ba016e0070cbbd (diff)
downloadcpython-b940e113bf90ff71b0ef57414ea2beea9d2a4bc0.zip
cpython-b940e113bf90ff71b0ef57414ea2beea9d2a4bc0.tar.gz
cpython-b940e113bf90ff71b0ef57414ea2beea9d2a4bc0.tar.bz2
SF patch 1631942 by Collin Winter:
(a) "except E, V" -> "except E as V" (b) V is now limited to a simple name (local variable) (c) V is now deleted at the end of the except block
Diffstat (limited to 'Lib/plat-mac/pimp.py')
-rw-r--r--Lib/plat-mac/pimp.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/plat-mac/pimp.py b/Lib/plat-mac/pimp.py
index ff696b1..6927ad7 100644
--- a/Lib/plat-mac/pimp.py
+++ b/Lib/plat-mac/pimp.py
@@ -76,7 +76,7 @@ def getDefaultDatabase(experimental=False):
url = DEFAULT_PIMPDATABASE_FMT % (PIMP_VERSION, status, pyvers, osname, rel, machine)
try:
urllib2.urlopen(url)
- except urllib2.HTTPError, arg:
+ except urllib2.HTTPError as arg:
pass
else:
break
@@ -589,13 +589,13 @@ class PimpPackage:
installTest = self._dict['Install-test'].strip() + '\n'
try:
exec(installTest, namespace)
- except ImportError, arg:
+ except ImportError as arg:
return "no", str(arg)
- except _scriptExc_NotInstalled, arg:
+ except _scriptExc_NotInstalled as arg:
return "no", str(arg)
- except _scriptExc_OldInstalled, arg:
+ except _scriptExc_OldInstalled as arg:
return "old", str(arg)
- except _scriptExc_BadInstalled, arg:
+ except _scriptExc_BadInstalled as arg:
return "bad", str(arg)
except:
sys.stderr.write("-------------------------------------\n")