From 476a283d08160737a7367cf879eeb8d694f92c8c Mon Sep 17 00:00:00 2001 From: Mathias Klette Date: Tue, 30 Apr 2013 17:05:15 +0200 Subject: [PATCH] fix: use setdefault method instead of try/except --- common_code.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/common_code.py b/common_code.py index 19a89b2..76e1154 100755 --- a/common_code.py +++ b/common_code.py @@ -40,11 +40,8 @@ def exit_error(): sys.exit(1) ENV = os.environ -ENV.update({'ARGV': ' '.join(sys.argv)}) -try: - ENV.update({'NO_UPLOAD': ENV['NO_UPLOAD']}) -except KeyError as e: - ENV.update({'NO_UPLOAD': False}) +ENV.setdefault('ARGV',' '.join(sys.argv) +ENV.setdefault('NO_UPLOAD','') BIN_GIT = '/usr/bin/git' BIN_RM = '/bin/rm' -- 2.39.5