Browse Source

Cherry-pick upstream commit to fix warning on Python 3.8 (Ubuntu 1857148)

Christoph Biedl 4 years ago
parent
commit
4192d0940f

+ 17 - 0
debian/patches/cherry-pick.0.4.15-31-g063a667.fixing-warning-on-python-3-8.patch

@@ -0,0 +1,17 @@
+Subject: Fixing warning on python 3.8
+Origin: 0.4.15-31-g063a667 <https://github.com/ahupp/python-magic/commit/063a667>
+Upstream-Author: Gabriel Diego Teixeira <gabrieldiegoteixeira@gmail.com>
+Date: Wed Feb 27 19:33:40 2019 -0800
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/python-magic/+bug/1857148
+
+--- a/magic/__init__.py
++++ b/magic/__init__.py
+@@ -201,7 +201,7 @@
+         return result
+ 
+ def errorcheck_negative_one(result, func, args):
+-    if result is -1:
++    if result == -1:
+         err = magic_error(args[0])
+         raise MagicException(err)
+     else:

+ 1 - 0
debian/patches/series

@@ -1,6 +1,7 @@
 # cherry-picked from upstream. Keep in chronological order
 cherry-pick.0.4.11-32-g9d127ce.update-filetype-reported-by-libmagic-5-23-for-keep-going-true.patch
 libmagic-compat.patch
+cherry-pick.0.4.15-31-g063a667.fixing-warning-on-python-3-8.patch
 
 # patches that should go upstream