diff options
| author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-07 19:57:19 +0100 |
|---|---|---|
| committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-07 19:57:19 +0100 |
| commit | be294278a0087f21d565a1084fb220ff936ae0bd (patch) | |
| tree | 88d26f5f50794e42e9d77530cf823b2d5805209d /gitdb/stream.py | |
| parent | 560a211001064261eb25ca874980591790fb7986 (diff) | |
| download | gitdb-be294278a0087f21d565a1084fb220ff936ae0bd.tar.gz | |
Protected stream closure against possibilty of being a bytes
For some reason, it gets bytes where it did expect a stream ... .
Probably I should have figured out where this was input, instead
of fixing it the brutal way
Diffstat (limited to 'gitdb/stream.py')
| -rw-r--r-- | gitdb/stream.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gitdb/stream.py b/gitdb/stream.py index d855257..826def3 100644 --- a/gitdb/stream.py +++ b/gitdb/stream.py @@ -145,7 +145,8 @@ class DecompressMemMapReader(LazyMixin): :note: can be called safely """ if self._close: - self._m.close() + if hasattr(self._m, 'close'): + self._m.close() self._close = False # END handle resource freeing |
