[h5py] 229/455: Fix __contains__ bug for HDF5 1.8

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:36 UTC 2015


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

ghisvail-guest pushed a commit to annotated tag 1.3.0
in repository h5py.

commit 0d25bc0575eb4a53854da7719963e5ead1cdc2a1
Author: andrewcollette <andrew.collette at gmail.com>
Date:   Sun Feb 15 22:21:43 2009 +0000

    Fix __contains__ bug for HDF5 1.8
---
 h5py/h5g.pyx | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/h5py/h5g.pyx b/h5py/h5g.pyx
index d8ef26b..b7a9111 100644
--- a/h5py/h5g.pyx
+++ b/h5py/h5g.pyx
@@ -433,14 +433,15 @@ cdef class GroupID(ObjectID):
 
         Determine if a group member of the given name is present
         """
-        IF H5PY_18API:
-            return <bint>H5Lexists(self.id, name, H5P_DEFAULT)
-        ELSE:
-            try:
+
+        try:
+            IF H5PY_18API:
+                return <bint>H5Lexists(self.id, name, H5P_DEFAULT)
+            ELSE:
                 H5Gget_objinfo(self.id, name, 1, NULL)
                 return True
-            except H5Error:
-                return False    
+        except H5Error:
+            return False    
 
     @nosync
     def __iter__(self):

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



More information about the debian-science-commits mailing list