diff options
| author | Chun Kuan Lee <[email protected]> | 2018-09-02 06:40:56 +0800 |
|---|---|---|
| committer | Chun Kuan Lee <[email protected]> | 2018-09-02 21:40:51 +0800 |
| commit | 5d62dcf9cfb5c0b2511c10667ed47ec3b3610d72 (patch) | |
| tree | 889a75810b9d906e72597ef8ed533db2aa0ed31a /contrib/devtools | |
| parent | Merge #14108: tests: Add missing locking annotations and locks (g_cs_orphans) (diff) | |
| download | discoin-5d62dcf9cfb5c0b2511c10667ed47ec3b3610d72.tar.xz discoin-5d62dcf9cfb5c0b2511c10667ed47ec3b3610d72.zip | |
lint: Make sure we read the command line inputs using utf-8 decoding in python
Diffstat (limited to 'contrib/devtools')
| -rwxr-xr-x | contrib/devtools/optimize-pngs.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/devtools/optimize-pngs.py b/contrib/devtools/optimize-pngs.py index 8b1f41f7e..e9481dbbc 100755 --- a/contrib/devtools/optimize-pngs.py +++ b/contrib/devtools/optimize-pngs.py @@ -27,7 +27,7 @@ def content_hash(filename): pngcrush = 'pngcrush' git = 'git' folders = ["src/qt/res/movies", "src/qt/res/icons", "share/pixmaps"] -basePath = subprocess.check_output([git, 'rev-parse', '--show-toplevel'], universal_newlines=True).rstrip('\n') +basePath = subprocess.check_output([git, 'rev-parse', '--show-toplevel'], universal_newlines=True, encoding='utf8').rstrip('\n') totalSaveBytes = 0 noHashChange = True @@ -50,7 +50,7 @@ for folder in folders: sys.exit(0) #verify - if "Not a PNG file" in subprocess.check_output([pngcrush, "-n", "-v", file_path], stderr=subprocess.STDOUT, universal_newlines=True): + if "Not a PNG file" in subprocess.check_output([pngcrush, "-n", "-v", file_path], stderr=subprocess.STDOUT, universal_newlines=True, encoding='utf8'): print("PNG file "+file+" is corrupted after crushing, check out pngcursh version") sys.exit(1) |