]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
fix: use try and except as intended
authorMathias Klette <mathias.klette@profitbricks.com>
Tue, 30 Apr 2013 14:56:51 +0000 (16:56 +0200)
committerMathias Klette <mathias.klette@profitbricks.com>
Tue, 30 Apr 2013 14:56:51 +0000 (16:56 +0200)
common_code.py

index cba42eb7db821609cb9d1d745c944a042370c84c..19a89b267cc3b45b5800ddc6ebca04bddb1744fb 100755 (executable)
@@ -43,7 +43,7 @@ ENV = os.environ
 ENV.update({'ARGV': ' '.join(sys.argv)})
 try:
     ENV.update({'NO_UPLOAD': ENV['NO_UPLOAD']})
-else:
+except KeyError as e:
     ENV.update({'NO_UPLOAD': False})
 
 BIN_GIT = '/usr/bin/git'