File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 1212install :
1313 - pip install coveralls
1414script :
15+ - ulimit -n 48
16+ - ulimit -n
1517 - nosetests -v --with-coverage
1618after_success :
1719 - coveralls
Original file line number Diff line number Diff line change @@ -91,9 +91,7 @@ def _set_cache_(self, attr):
9191 self ._parse_header_info ()
9292
9393 def __del__ (self ):
94- if self ._close :
95- self ._m .close ()
96- # END handle resource freeing
94+ self .close ()
9795
9896 def _parse_header_info (self ):
9997 """If this stream contains object data, parse the header info and skip the
@@ -141,6 +139,16 @@ def data(self):
141139 """:return: random access compatible data we are working on"""
142140 return self ._m
143141
142+ def close (self ):
143+ """Close our underlying stream of compressed bytes if this was allowed during initialization
144+ :return: True if we closed the underlying stream
145+ :note: can be called safely
146+ """
147+ if self ._close :
148+ self ._m .close ()
149+ self ._close = False
150+ # END handle resource freeing
151+
144152 def compressed_bytes_read (self ):
145153 """
146154 :return: number of compressed bytes read. This includes the bytes it
You can’t perform that action at this time.
0 commit comments