Skip to content

Commit

Permalink
python3 bugfix for opening files as binary
Browse files Browse the repository at this point in the history
  • Loading branch information
fyngyrz authored Jul 31, 2022
1 parent 2f0d0b7 commit 34f09eb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions aa_macrov3.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,9 +760,8 @@ def sCallsignKeyF(self,line):
def gis(self,fn):
def rhead(fn, length):
try:
fh = open(fn)
content = fh.read(length)
fh.close()
with open(fh,'rb') as fhx:
content = fhx.read(length)
except:
return ''
if len(content) != length:
Expand Down

0 comments on commit 34f09eb

Please sign in to comment.