cherry-pick.0.4.15-31-g063a667.fixing-warning-on-python-3-8.patch 580 B

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