[Yt-svn] commit/yt: samskillman: Backing out the change from earlier. Setting self._handle to None.

Bitbucket commits-noreply at bitbucket.org
Thu Jun 23 21:28:44 PDT 2011


1 new changeset in yt:

http://bitbucket.org/yt_analysis/yt/changeset/d0f8c05ce2bf/
changeset:   d0f8c05ce2bf
branch:      yt
user:        samskillman
date:        2011-06-24 06:28:01
summary:     Backing out the change from earlier.  Setting self._handle to None.
This should fix issues with reading in FLASH with some versions of
h5py.
affected #:  1 file (31 bytes)

--- a/yt/frontends/flash/data_structures.py	Thu Jun 23 15:40:50 2011 -0600
+++ b/yt/frontends/flash/data_structures.py	Thu Jun 23 22:28:01 2011 -0600
@@ -293,7 +293,7 @@
                 self._handle["file format version"][:])
         elif "sim info" in self._handle:
             self._flash_version = int(
-                self._handle["sim info"]["file format version"])
+                self._handle["sim info"][:]["file format version"])
         else:
             raise RuntimeError("Can't figure out FLASH file version.")
         self.domain_left_edge = na.array(
@@ -338,6 +338,7 @@
             self.current_redshift = self.omega_lambda = self.omega_matter = \
                 self.hubble_constant = self.cosmological_simulation = 0.0
         self._handle.close()
+        self._handle = None
 
     @classmethod
     def _is_valid(self, *args, **kwargs):

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