[Yt-svn] yt-commit r1043 - trunk/yt/lagos
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Thu Dec 25 19:45:41 PST 2008
Author: mturk
Date: Thu Dec 25 19:45:41 2008
New Revision: 1043
URL: http://yt.spacepope.org/changeset/1043
Log:
Changing the default name of the .yt file: any NEW .yt files will be named the
basename of the data output. Any existing .yt files named after the
CurrentTimeIdentifier will still be recognized.
Modified:
trunk/yt/lagos/HierarchyType.py
Modified: trunk/yt/lagos/HierarchyType.py
==============================================================================
--- trunk/yt/lagos/HierarchyType.py (original)
+++ trunk/yt/lagos/HierarchyType.py Thu Dec 25 19:45:41 2008
@@ -108,7 +108,12 @@
def _initialize_data_file(self):
if not ytcfg.getboolean('lagos','serialize'): return
- fn = os.path.join(self.directory,"%s.yt" % self["CurrentTimeIdentifier"])
+ if os.path.isfile(os.path.join(self.directory,
+ "%s.yt" % self["CurrentTimeIdentifier"])):
+ fn = os.path.join(self.directory,"%s.yt" % self["CurrentTimeIdentifier"])
+ else:
+ fn = os.path.join(self.directory,
+ "%s.yt" % self.parameter_file.basename)
if ytcfg.getboolean('lagos','onlydeserialize'):
self._data_mode = mode = 'r'
else:
More information about the yt-svn
mailing list