From 0589f3d4fe2cde6c1ce5d8e12632f881aa48941b Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 20 Sep 2012 13:47:57 +0200 Subject: [PATCH] fix syntax --- debian_build.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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): -- 2.39.5