mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 10:12:28 +02:00
lint: Make sure we read the command line inputs using utf-8 decoding in python
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user