[Yt-svn] yt-commit r1355 - trunk/yt/lagos
britton at wrangler.dreamhost.com
britton at wrangler.dreamhost.com
Mon Jun 29 17:05:22 PDT 2009
Author: britton
Date: Mon Jun 29 17:05:21 2009
New Revision: 1355
URL: http://yt.spacepope.org/changeset/1355
Log:
Fixed bug related to checking for existence of a subgroup inside
a group that also doesn't exist.
Modified:
trunk/yt/lagos/HierarchyType.py
Modified: trunk/yt/lagos/HierarchyType.py
==============================================================================
--- trunk/yt/lagos/HierarchyType.py (original)
+++ trunk/yt/lagos/HierarchyType.py Mon Jun 29 17:05:21 2009
@@ -204,10 +204,18 @@
if self._data_file == None:
return None
if node[0] != "/": node = "/%s" % node
- full_name = "%s/%s" % (node, name)
- if full_name not in self._data_file:
+
+ myGroup = self._data_file['/']
+ for group in node.split('/'):
+ if group:
+ if group not in myGroup.listnames():
+ return None
+ myGroup = myGroup[group]
+ if name not in myGroup.listnames():
return None
- return self._data_file["%s/%s" % (node, name)]
+
+ full_name = "%s/%s" % (node, name)
+ return self._data_file[full_name]
def _close_data_file(self):
if self._data_file:
More information about the yt-svn
mailing list