Skip to content

Commit

Permalink
Update binary.py
Browse files Browse the repository at this point in the history
As suggested by @bgruening
  • Loading branch information
lecorguille committed Aug 4, 2016
1 parent ecce257 commit 37a0ec5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/galaxy/datatypes/binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -1345,7 +1345,8 @@ def display_peek( self, dataset ):

def sniff( self, filename ):
try:
header = open( filename ).read(3)
with open( filename, 'r' ) as f:
header = f.read(3)
if binascii.b2a_hex( header ) == binascii.hexlify( 'CDF' ):
return True
return False
Expand Down

0 comments on commit 37a0ec5

Please sign in to comment.