mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-24 07:41:54 -07:00
Oops, python 2.7 doesn't have open(..., encoding=).
Copied from Perforce Change: 184034 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
c03eb1419f
commit
0ab15d7930
1 changed files with 3 additions and 3 deletions
|
|
@ -91,7 +91,7 @@ def index_sub(m):
|
|||
return s
|
||||
|
||||
def convert_file(name, source, dest):
|
||||
s = open(source, encoding='utf-8').read()
|
||||
s = open(source, 'rb').read().decode('utf-8')
|
||||
# We want the index directive to go right at the start, so that it leads
|
||||
# to the whole document.
|
||||
m = index.search(s)
|
||||
|
|
@ -115,8 +115,8 @@ def convert_file(name, source, dest):
|
|||
os.makedirs(os.path.dirname(dest))
|
||||
except:
|
||||
pass
|
||||
with open(dest, mode='w', encoding='utf-8') as out:
|
||||
out.write(s)
|
||||
with open(dest, 'wb') as out:
|
||||
out.write(s.encode('utf-8'))
|
||||
|
||||
# Mini-make
|
||||
def convert_updated(app):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue