From: Holger Levsen Date: Thu, 20 Sep 2012 11:47:57 +0000 (+0200) Subject: fix syntax X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=0589f3d4fe2cde6c1ce5d8e12632f881aa48941b;p=profitbricks%2Fjenkins-build-scripts.git fix syntax --- diff --git a/debian_build.py b/debian_build.py index 21bb67c..367a7c4 100755 --- a/debian_build.py +++ b/debian_build.py @@ -130,12 +130,12 @@ def db_add_job(con, name): cur = con.cursor() cur.execute("SAVEPOINT a") try: - cur.execute("INSERT INTO jenkins_job(name) VALUES(%s)") - logger.debug("saved %s to databased" %(job_name)) + cur.execute("INSERT INTO jenkins_job(name) VALUES('%s')" % name) + logger.debug("saved %s to databased" %(name)) except psycopg2.DatabaseError as e: # record already exist cur.execute("ROLLBACK TO a") # have to rollback after failed command - logger.debug("could not save %s to databased" %(job_name)) + logger.debug("could not save %s to databased" %(name)) #def add_package_instance("profitbricks", $BUILD_JOBNAME, $BUILD_NUMBER, changes_file) def add_package_instance(origin, job_name, job_id, changes_file, version):