Skip to content

Commit

Permalink
Open gzip files in text mode
Browse files Browse the repository at this point in the history
Without this we get a byte string, which subsequently fails when we
call line.startswith(<str>) a few lines below.
  • Loading branch information
rjgildea committed Jul 5, 2022
1 parent 723048e commit 82d81b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self, cryst1_line):

def read_metadata(pdb, print_errors):
if pdb.endswith('.gz'):
f = gzip.open(pdb, 'rb')
f = gzip.open(pdb, 'rt')
else:
f = open(pdb)
meta = None
Expand Down

0 comments on commit 82d81b0

Please sign in to comment.