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
diff --git a/Lib/plat-mac/aetools.py b/Lib/plat-mac/aetools.py
index 55288bf..7a52eb9a 100644
--- a/Lib/plat-mac/aetools.py
+++ b/Lib/plat-mac/aetools.py
@@ -57,7 +57,7 @@
def missed(ae):
try:
desc = ae.AEGetAttributeDesc('miss', 'keyw')
- except AE.Error, msg:
+ except AE.Error as msg:
return None
return desc.data
@@ -86,7 +86,7 @@
for key in aekeywords:
try:
desc = ae.AEGetAttributeDesc(key, '****')
- except (AE.Error, MacOS.Error), msg:
+ except (AE.Error, MacOS.Error) as msg:
if msg[0] != -1701 and msg[0] != -1704:
raise
continue