mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-05 18:43:47 +00:00
Fix compile errors on some systems
This commit is contained in:
@@ -6,7 +6,7 @@ import datetime
|
||||
|
||||
# It removes script and style tags and replaces with the file content.
|
||||
|
||||
f = open('src/index.html')
|
||||
f = open('src/index.html', "r", encoding="utf-8")
|
||||
page = f.read()
|
||||
f.close()
|
||||
|
||||
@@ -18,7 +18,7 @@ scripts = scriptsFinder.findall(page)
|
||||
|
||||
for script in scripts:
|
||||
filename = os.path.join("src", script)
|
||||
s = open(filename)
|
||||
s = open(filename, "r", encoding="utf-8")
|
||||
scriptContent = "<script>%s</script>" % s.read()
|
||||
s.close()
|
||||
scriptTag = """<script src="%s"></script>""" % script
|
||||
@@ -32,7 +32,7 @@ styles = stylesFinder.findall(page)
|
||||
|
||||
for style in styles:
|
||||
filename = os.path.join("src", style)
|
||||
s = open(filename)
|
||||
s = open(filename, "r", encoding="utf-8")
|
||||
styleContent = "<style>%s</style>" % s.read()
|
||||
s.close()
|
||||
styleTag = """<link rel="stylesheet" href="%s">""" % style
|
||||
@@ -41,7 +41,7 @@ for style in styles:
|
||||
|
||||
# Write the standalone file
|
||||
|
||||
f = open('bip39-standalone.html', 'w')
|
||||
f = open('bip39-standalone.html', 'w', encoding="utf-8")
|
||||
f.write(page)
|
||||
f.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user