]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
fix syntax
authorHolger Levsen <holger@layer-acht.org>
Thu, 20 Sep 2012 11:47:57 +0000 (13:47 +0200)
committerHolger Levsen <holger@layer-acht.org>
Thu, 20 Sep 2012 11:47:57 +0000 (13:47 +0200)
debian_build.py

index 21bb67c4192248d62cc702ed890f3b0023a6115f..367a7c48f30a069e8f4c30524861c10a8fb9424c 100755 (executable)
@@ -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):