Author: Manuel Jacob <m...@manueljacob.de> Branch: Changeset: r77715:0975d089db78 Date: 2015-05-30 22:08 +0200 http://bitbucket.org/pypy/pypy/changeset/0975d089db78/
Log: Use Py3k-compatible syntax here. diff --git a/lib_pypy/_ctypes/function.py b/lib_pypy/_ctypes/function.py --- a/lib_pypy/_ctypes/function.py +++ b/lib_pypy/_ctypes/function.py @@ -278,7 +278,7 @@ for argtype, arg in zip(argtypes, args)] try: return to_call(*args) - except SystemExit, e: + except SystemExit as e: handle_system_exit(e) raise return f @@ -306,12 +306,12 @@ try: newargs = self._convert_args_for_callback(argtypes, args) - except (UnicodeError, TypeError, ValueError), e: + except (UnicodeError, TypeError, ValueError) as e: raise ArgumentError(str(e)) try: try: res = self.callable(*newargs) - except SystemExit, e: + except SystemExit as e: handle_system_exit(e) raise except: @@ -575,7 +575,7 @@ for i, argtype in enumerate(argtypes): try: keepalive, newarg, newargtype = self._conv_param(argtype, args[i]) - except (UnicodeError, TypeError, ValueError), e: + except (UnicodeError, TypeError, ValueError) as e: raise ArgumentError(str(e)) keepalives.append(keepalive) newargs.append(newarg) @@ -586,7 +586,7 @@ for i, arg in enumerate(extra): try: keepalive, newarg, newargtype = self._conv_param(None, arg) - except (UnicodeError, TypeError, ValueError), e: + except (UnicodeError, TypeError, ValueError) as e: raise ArgumentError(str(e)) keepalives.append(keepalive) newargs.append(newarg) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit