Skip to content
Myr

Merge pull request #410 from eriolv/develop

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fix SyntaxError on Python3 because "except Error, e" is not supported anymore

authored by Kenneth Reitz · committed by Kenneth Reitz · parents afa2e86, c40d6d0 · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:requests/packages/oreos/structures.py+3 added-3 removed
360 unmodified lines
361 not in the dictionary.362 """363 try:364 return dict.pop(self, key)[0]365 except KeyError, e:365 except KeyError as e:366 if default is not _missing:367 return default368 raise KeyError(str(e))369
1 unmodified line
371 """Pop an item from the dict."""372 try:373 item = dict.popitem(self)374 return (item[0], item[1][0])375 except KeyError, e:375 except KeyError as e:376 raise KeyError(str(e))377378 def poplist(self, key):379 """Pop the list for a key from the dict. If the key is not in the dict
8 unmodified lines
388 def popitemlist(self):389 """Pop a ``(key, list)`` tuple from the dict."""390 try:391 return dict.popitem(self)392 except KeyError, e:392 except KeyError as e:393 raise KeyError(str(e))394395 def __copy__(self):396 return self.copy()
3 unmodified lines