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-irix6/torgb.py b/Lib/plat-irix6/torgb.py
index 54c86c4..02bcb53 100644
--- a/Lib/plat-irix6/torgb.py
+++ b/Lib/plat-irix6/torgb.py
@@ -80,7 +80,7 @@
         fname = filename
     try:
         ftype = imghdr.what(fname)
-    except IOError, msg:
+    except IOError as msg:
         if type(msg) == type(()) and len(msg) == 2 and \
                 type(msg[0]) == type(0) and type(msg[1]) == type(''):
             msg = msg[1]