aboutsummaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorDaniele Tricoli <eriol@mornie.org>2012-02-05 03:56:00 +0000
committerDaniele Tricoli <eriol@mornie.org>2012-02-05 03:56:00 +0000
commit78b13cd0a8a4cd4aff0e975b770da6bb2a6c4497 (patch)
treec80e0e8b74856004992a4dc6861feff5d2909cf8 /debian/patches
parentc211ec9b0394f32dba88f01e553a7df5314ff2e7 (diff)
downloadpython-requests-78b13cd0a8a4cd4aff0e975b770da6bb2a6c4497.tar
python-requests-78b13cd0a8a4cd4aff0e975b770da6bb2a6c4497.tar.gz
* debian/patches/02_fix-python3-except-sintax-error.patches
- Fix SyntaxError on Python3 because "except Error, e" is not supported anymore
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/02_fix-python3-except-sintax-error.patch35
-rw-r--r--debian/patches/series1
2 files changed, 36 insertions, 0 deletions
diff --git a/debian/patches/02_fix-python3-except-sintax-error.patch b/debian/patches/02_fix-python3-except-sintax-error.patch
new file mode 100644
index 0000000..8e0eb52
--- /dev/null
+++ b/debian/patches/02_fix-python3-except-sintax-error.patch
@@ -0,0 +1,35 @@
+Description: Fix SyntaxError on Python3 because "except Error, e" is not
+ supported anymore.
+Author: Daniele Tricoli <eriol@mornie.org>
+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):
diff --git a/debian/patches/series b/debian/patches/series
index 94aff1f..38c3ed3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
01_do-not-use-python-certifi.patch
+02_fix-python3-except-sintax-error.patch