[Yt-svn] commit/yt: MatthewTurk: Fixing references to now-obsolete h5py functions

Bitbucket commits-noreply at bitbucket.org
Tue Jun 7 21:03:08 PDT 2011


1 new changeset in yt:

http://bitbucket.org/yt_analysis/yt/changeset/97e9f2213099/
changeset:   97e9f2213099
branch:      yt
user:        MatthewTurk
date:        2011-06-08 06:02:57
summary:     Fixing references to now-obsolete h5py functions
affected #:  1 file (48 bytes)

--- a/yt/data_objects/hierarchy.py	Tue Jun 07 20:24:55 2011 -0700
+++ b/yt/data_objects/hierarchy.py	Tue Jun 07 21:02:57 2011 -0700
@@ -205,10 +205,10 @@
             exception = h5py.h5.H5Error
         try:
             node_loc = self._data_file[node]
-            if name in node_loc.listnames() and force:
+            if name in node_loc and force:
                 mylog.info("Overwriting node %s/%s", node, name)
                 del self._data_file[node][name]
-            elif name in node_loc.listnames() and passthrough:
+            elif name in node_loc and passthrough:
                 return
         except exception:
             pass
@@ -268,10 +268,10 @@
         myGroup = self._data_file['/']
         for group in node.split('/'):
             if group:
-                if group not in myGroup.listnames():
+                if group not in myGroup:
                     return None
                 myGroup = myGroup[group]
-        if name not in myGroup.listnames():
+        if name not in myGroup:
             return None
 
         full_name = "%s/%s" % (node, name)

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list