[python-hdf5storage] 43/84: Fixed bug from isinstance(True, int) being True in Python 3.x

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Feb 29 08:25:02 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to annotated tag 0.1.10
in repository python-hdf5storage.

commit eef4ded0c94dd37242cb0495273f494d96bd7bf3
Author: Freja Nordsiek <fnordsie at gmail.com>
Date:   Sun Apr 26 03:36:26 2015 -0400

    Fixed bug from isinstance(True, int) being True in Python 3.x
---
 hdf5storage/Marshallers.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hdf5storage/Marshallers.py b/hdf5storage/Marshallers.py
index 7159162..d553079 100644
--- a/hdf5storage/Marshallers.py
+++ b/hdf5storage/Marshallers.py
@@ -1315,7 +1315,7 @@ class PythonScalarMarshaller(NumpyScalarArrayMarshaller):
             tp = int
         else:
             tp = long
-        if isinstance(data, tp):
+        if type(data) == tp:
             if data > 2**63 or data < -(2**63) + 1:
                 raise NotImplementedError('Int/long too big to fit ' \
                     + 'into numpy.int64.')

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-hdf5storage.git



More information about the debian-science-commits mailing list