py3 compat

This commit is contained in:
Kovid Goyal 2020-09-02 11:17:00 +05:30
parent 59dc40a22b
commit b7608b71f9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -805,7 +805,7 @@ class GetTranslations(Translations): # {{{
for f in errfiles: for f in errfiles:
with open(f, 'r+b') as f: with open(f, 'r+b') as f:
raw = f.read() raw = f.read()
raw = re.sub(r'# \(pofilter\).*', '', raw) raw = re.sub(rb'# \(pofilter\).*', '', raw)
f.seek(0) f.seek(0)
f.truncate() f.truncate()
f.write(raw) f.write(raw)