[Yt-svn] yt-commit r1097 - trunk/yt/lagos

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Thu Jan 8 15:40:52 PST 2009


Author: mturk
Date: Thu Jan  8 15:40:52 2009
New Revision: 1097
URL: http://yt.spacepope.org/changeset/1097

Log:
Two fixes: if you don't have write permission, it will not open the data file
for writing anymore.  ADditionally, a fix where parallel projections were not
stored correctly.



Modified:
   trunk/yt/lagos/BaseDataTypes.py
   trunk/yt/lagos/HierarchyType.py

Modified: trunk/yt/lagos/BaseDataTypes.py
==============================================================================
--- trunk/yt/lagos/BaseDataTypes.py	(original)
+++ trunk/yt/lagos/BaseDataTypes.py	Thu Jan  8 15:40:52 2009
@@ -933,7 +933,7 @@
         if source is None:
             check, source = self._partition_hierarchy_2d(self.axis)
             self._check_region = check
-            self._okay_to_serialize = (not check)
+            #self._okay_to_serialize = (not check)
         else:
             self._okay_to_serialize = False
             self._check_region = True

Modified: trunk/yt/lagos/HierarchyType.py
==============================================================================
--- trunk/yt/lagos/HierarchyType.py	(original)
+++ trunk/yt/lagos/HierarchyType.py	Thu Jan  8 15:40:52 2009
@@ -114,7 +114,8 @@
         else:
             fn = os.path.join(self.directory,
                     "%s.yt" % self.parameter_file.basename)
-        if ytcfg.getboolean('lagos','onlydeserialize'):
+        if ytcfg.getboolean('lagos','onlydeserialize') and \
+           os.access(fn, os.W_OK):
             self._data_mode = mode = 'r'
         else:
             self._data_mode = mode = 'a'



More information about the yt-svn mailing list