Python 2 fix

This commit is contained in:
Thomas Nagy 2016-07-25 23:10:10 +02:00
parent c916febaf7
commit 8e68aa4ade
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA
1 changed files with 1 additions and 1 deletions

View File

@ -303,7 +303,7 @@ def rm_blank_lines(txt):
BOM = '\xef\xbb\xbf'
try:
BOM = bytes(BOM, 'iso8859-1') # python 3
except NameError:
except (TypeError, NameError):
pass
def stealth_write(self, data, flags='wb'):