]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
fix logging
authorHolger Levsen <holger@layer-acht.org>
Fri, 28 Sep 2012 16:28:01 +0000 (18:28 +0200)
committerHolger Levsen <holger@layer-acht.org>
Fri, 28 Sep 2012 16:28:01 +0000 (18:28 +0200)
db_add.py
debian_build.py

index 0b524118d74774fad054e9f1cc38363ebf6c7095..70a4802089b2bdf7578d35cb658792940d79b8bc 100755 (executable)
--- a/db_add.py
+++ b/db_add.py
@@ -11,6 +11,7 @@ import subprocess
 import time
 import fileinput
 import psycopg2
+import logging
 from common_code import *
 from cidb import *
 
@@ -120,7 +121,6 @@ def add_package_instances(origin, job_name, build_number, changes_file, version,
     return db_package_instance_ids
 
 def add_package_version(origin, package, version):
-    logger = logger_init()
     con = db_connect()
     db_origin_id = db_add_origin(con, origin) 
     db_package_id = db_add_package (con, package)
index a14d980645ca6f2ddfc209fd9d1d3df00d8b441a..6efa345b9d3fa3f2fab0815fa768125de9cd7f6b 100755 (executable)
@@ -31,6 +31,9 @@ from lib import git_buildpackage
 from multiprocessing import cpu_count
 from ConfigParser import SafeConfigParser
 
+
+logger = logger_init()
+
 JOB_URL = 'http://jenkins:80/job/%(flavour)s/buildWithParameters?token=BuildIt&'
 JOB_DELAY = '0sec'
 
@@ -193,7 +196,6 @@ def getopts():
     return parser.parse_args()
 
 if __name__ == '__main__':
-    logger = logger_init()
     logger.debug('Called in: %s' % os.getcwd())
     logger.debug('Called with: %s' % " ".join(sys.argv))
     logger.debug(