[Yt-svn] yt-commit r437 - trunk/yt/lagos
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Sun May 4 17:43:11 PDT 2008
Author: mturk
Date: Sun May 4 17:43:10 2008
New Revision: 437
URL: http://yt.spacepope.org/changeset/437
Log:
Quick addition of a method to manually close the data file.
Modified:
trunk/yt/lagos/HierarchyType.py
Modified: trunk/yt/lagos/HierarchyType.py
==============================================================================
--- trunk/yt/lagos/HierarchyType.py (original)
+++ trunk/yt/lagos/HierarchyType.py Sun May 4 17:43:10 2008
@@ -230,13 +230,16 @@
except tables.exceptions.NoSuchNodeError:
return None
+ def _close_data_file(self):
+ if self.__data_file:
+ self.__data_file.close()
+ del self.__data_file
+
def __del__(self):
"""
Let's see if we can delete some stuff here!
"""
- if self.__data_file:
- self.__data_file.close()
- del self.__data_file
+ self._close_data_file()
try:
del self.eiTopGrid
except:
More information about the yt-svn
mailing list