diff options
author | 4eadd52d <4eadd52d@gmail.com> | 2017-05-19 18:08:54 +1000 |
---|---|---|
committer | 4eadd52d <4eadd52d@gmail.com> | 2017-05-19 18:08:54 +1000 |
commit | ed5c77c4136edebfbfad3dd4588d2646979b9f3a (patch) | |
tree | 46668942bdaf792425d14f2c259f55940c55cceb | |
parent | 0d1150545f04843a1fbe09f2e8f612a800aed7a8 (diff) | |
download | BIP39-ed5c77c4136edebfbfad3dd4588d2646979b9f3a.tar.gz BIP39-ed5c77c4136edebfbfad3dd4588d2646979b9f3a.tar.zst BIP39-ed5c77c4136edebfbfad3dd4588d2646979b9f3a.zip |
Fix compile errors on some systems
-rw-r--r-- | compile.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -6,7 +6,7 @@ import datetime | |||
6 | 6 | ||
7 | # It removes script and style tags and replaces with the file content. | 7 | # It removes script and style tags and replaces with the file content. |
8 | 8 | ||
9 | f = open('src/index.html') | 9 | f = open('src/index.html', "r", encoding="utf-8") |
10 | page = f.read() | 10 | page = f.read() |
11 | f.close() | 11 | f.close() |
12 | 12 | ||
@@ -18,7 +18,7 @@ scripts = scriptsFinder.findall(page) | |||
18 | 18 | ||
19 | for script in scripts: | 19 | for script in scripts: |
20 | filename = os.path.join("src", script) | 20 | filename = os.path.join("src", script) |
21 | s = open(filename) | 21 | s = open(filename, "r", encoding="utf-8") |
22 | scriptContent = "<script>%s</script>" % s.read() | 22 | scriptContent = "<script>%s</script>" % s.read() |
23 | s.close() | 23 | s.close() |
24 | scriptTag = """<script src="%s"></script>""" % script | 24 | scriptTag = """<script src="%s"></script>""" % script |
@@ -32,7 +32,7 @@ styles = stylesFinder.findall(page) | |||
32 | 32 | ||
33 | for style in styles: | 33 | for style in styles: |
34 | filename = os.path.join("src", style) | 34 | filename = os.path.join("src", style) |
35 | s = open(filename) | 35 | s = open(filename, "r", encoding="utf-8") |
36 | styleContent = "<style>%s</style>" % s.read() | 36 | styleContent = "<style>%s</style>" % s.read() |
37 | s.close() | 37 | s.close() |
38 | styleTag = """<link rel="stylesheet" href="%s">""" % style | 38 | styleTag = """<link rel="stylesheet" href="%s">""" % style |
@@ -41,7 +41,7 @@ for style in styles: | |||
41 | 41 | ||
42 | # Write the standalone file | 42 | # Write the standalone file |
43 | 43 | ||
44 | f = open('bip39-standalone.html', 'w') | 44 | f = open('bip39-standalone.html', 'w', encoding="utf-8") |
45 | f.write(page) | 45 | f.write(page) |
46 | f.close() | 46 | f.close() |
47 | 47 | ||