[yt-svn] commit/yt: jzuhone: Merged in xarthisius/yt (pull request #2128)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Apr 20 11:10:56 PDT 2016


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/605942cb9f98/
Changeset:   605942cb9f98
Branch:      yt
User:        jzuhone
Date:        2016-04-20 18:10:40+00:00
Summary:     Merged in xarthisius/yt (pull request #2128)

Add close() to HDF5FileHandler. Closes #1211
Affected #:  1 file

diff -r 27481b513244c9c7bb15578ed5381a812983e567 -r 605942cb9f98aaa215ee0bd67b0293bdd2302598 yt/utilities/file_handler.py
--- a/yt/utilities/file_handler.py
+++ b/yt/utilities/file_handler.py
@@ -14,7 +14,6 @@
 #-----------------------------------------------------------------------------
 
 from yt.utilities.on_demand_imports import _h5py as h5py
-
 from distutils.version import LooseVersion
 
 class HDF5FileHandler(object):
@@ -51,6 +50,10 @@
     def items(self):
         return list(self.handle.items())
 
+    def close(self):
+        if self.handle is not None:
+            self.handle.close()
+
 class FITSFileHandler(HDF5FileHandler):
     def __init__(self, filename):
         from yt.utilities.on_demand_imports import _astropy

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-svn-spacepope.org/attachments/20160420/f07a4336/attachment.htm>


More information about the yt-svn mailing list