From cab101081ff723a8aa4c103fca0039aa5c0b49bf Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 28 Sep 2012 18:28:01 +0200 Subject: [PATCH] fix logging --- db_add.py | 2 +- debian_build.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/db_add.py b/db_add.py index 0b52411..70a4802 100755 --- 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) diff --git a/debian_build.py b/debian_build.py index a14d980..6efa345 100755 --- a/debian_build.py +++ b/debian_build.py @@ -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( -- 2.39.5