Description: Fix SyntaxError on Python3 because "except Error, e" is not supported anymore. Author: Daniele Tricoli Forwarded: https://github.com/kennethreitz/requests/pull/410 Last-Update: 2012-02-05 --- a/requests/packages/oreos/structures.py +++ b/requests/packages/oreos/structures.py @@ -362,7 +362,7 @@ """ try: return dict.pop(self, key)[0] - except KeyError, e: + except KeyError as e: if default is not _missing: return default raise KeyError(str(e)) @@ -372,7 +372,7 @@ try: item = dict.popitem(self) return (item[0], item[1][0]) - except KeyError, e: + except KeyError as e: raise KeyError(str(e)) def poplist(self, key): @@ -389,7 +389,7 @@ """Pop a ``(key, list)`` tuple from the dict.""" try: return dict.popitem(self) - except KeyError, e: + except KeyError as e: raise KeyError(str(e)) def __copy__(self):