aboutsummaryrefslogtreecommitdiff
path: root/contrib/devtools/update-translations.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2017-08-29 08:53:34 +1200
committerMarcoFalke <falke.marco@gmail.com>2017-08-29 08:53:49 +1200
commit60dd9cc470584960431de425e2a9ffbed0e8034a (patch)
treed937bf4a8316a6d602e2fc5e1f5be48b4c77f0c4 /contrib/devtools/update-translations.py
parentcee4fe1d53b2e1ff91ff48bc881cb41dfba01c52 (diff)
parent78214588d6b8b7199015113c9d0d8250d6150014 (diff)
downloadbitcoin-60dd9cc470584960431de425e2a9ffbed0e8034a.tar.xz
Merge #10781: Python cleanups
78214588d Use for-loop instead of list comprehension (practicalswift) 823979436 Use the variable name _ for unused return values (practicalswift) 2e6080bbf Remove unused variables and/or function calls (practicalswift) 9b94054b7 Avoid reference to undefined name: stderr does not exist, sys.stderr does (practicalswift) 51cb6b822 Use print(...) instead of undefined printf(...) (practicalswift) 25cd520fc Use sys.exit(...) instead of exit(...): exit(...) should not be used in programs (practicalswift) Pull request description: Python cleanups: * Avoid reference to undefined name: `stderr` does not exist, `sys.stderr` does * Use `print(...)` instead of undefined `printf(...)` * Avoid redefinition of variable (`tx`) in list comprehension * Remove unused variables and/or function calls * Use `sys.exit(...)` instead of `exit(...)`: [`exit(...)` should not be used in programs](https://github.com/bitcoin/bitcoin/pull/10753#discussion_r125935027) Tree-SHA512: 1238dfbc1d20f7edadea5e5406a589f293065638f6234809f0d5b6ba746dffe3d276bc5884c7af388a6c798c61a8759faaccf57f381225644754c0f61914eb4b
Diffstat (limited to 'contrib/devtools/update-translations.py')
-rwxr-xr-xcontrib/devtools/update-translations.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/devtools/update-translations.py b/contrib/devtools/update-translations.py
index 2011841005..e1924749d2 100755
--- a/contrib/devtools/update-translations.py
+++ b/contrib/devtools/update-translations.py
@@ -36,12 +36,12 @@ def check_at_repository_root():
if not os.path.exists('.git'):
print('No .git directory found')
print('Execute this script at the root of the repository', file=sys.stderr)
- exit(1)
+ sys.exit(1)
def fetch_all_translations():
if subprocess.call([TX, 'pull', '-f', '-a']):
print('Error while fetching translations', file=sys.stderr)
- exit(1)
+ sys.exit(1)
def find_format_specifiers(s):
'''Find all format specifiers in a string.'''