Skip to content

Commit

Permalink
BUG: Fix open file handle (#802)
Browse files Browse the repository at this point in the history
Fixes #801
  • Loading branch information
ElDeveloper authored and wasade committed Aug 27, 2019
1 parent 619e591 commit 38e64fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion biom/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ def is_gzip(fp):
project, but we obtained permission from the authors of this function to
port it to the BIOM Format project (and keep it under BIOM's BSD license).
"""
return open(fp, 'rb').read(2) == b'\x1f\x8b'
with open(fp, 'rb') as f:
return f.read(2) == b'\x1f\x8b'


@contextmanager
Expand Down

0 comments on commit 38e64fc

Please sign in to comment.