]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
fix debian_build: try to fix correct exception printing
authorMathias Klette <mathias.klette@profitbricks.com>
Thu, 2 May 2013 09:56:36 +0000 (11:56 +0200)
committerMathias Klette <mathias.klette@profitbricks.com>
Thu, 2 May 2013 10:01:26 +0000 (12:01 +0200)
debian_build.py

index a4ed149c9a16d090fa7f9b3769fa119d0c547f7d..0daa6c9f565e794c8797a0df9a54992ed7e51a85 100755 (executable)
@@ -631,10 +631,10 @@ if __name__ == '__main__':
     if GIT_BRANCH_NAME == 'master' or GIT_BRANCH_NAME == 'develop' or GIT_BRANCH_NAME.startswith('hotfix/'):
         try:
             package_instances = add_package_instances("profitbricks", ENV['JOB_NAME'], ENV['BUILD_NUMBER'], changes_file, version, BUILD_START, BUILD_END)
-        except Exception, error:
+        except Exception as error:
             cmd = ['figlet-figlet', '-t', 'CIDB problem:']
             subprocess.check_call(cmd)
-            logger.error("package instance not added to DB")
+            logger.error("package instance not added to DB", exc_info=error)
             exit_error()
         # only trigger liveboots automatically for builds from master+hotfix/* branches
         if len(package_instances) > 0 and ( GIT_BRANCH_NAME == 'master' or GIT_BRANCH_NAME.startswith('hotfix/')):