From: Holger Levsen Date: Wed, 26 Sep 2012 10:04:09 +0000 (+0200) Subject: Revert "make it a script again" X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=6b39b1516aec0596997f1fa1c86b572d5c738905;p=profitbricks%2Fjenkins-build-scripts.git Revert "make it a script again" This reverts commit 8d2602b1e5007a186df18b5e7a5179028ad5e88b. --- diff --git a/add_liveboot_request.py b/add_liveboot_request.py index 9471bb4..a3fad10 100644 --- a/add_liveboot_request.py +++ b/add_liveboot_request.py @@ -87,13 +87,7 @@ def insert_liveboot_request(con, owner_uid, package_list_id): cur.execute("INSERT INTO liveboot_request(owner_uid, package_list_id)" " VALUES(%s)", (owner_uid, package_list_id)) -if __name__ == "__main__": - if len(sys.argv) != 2: - print("usage: %s deb_package_instance_id") - sys.exit(1) - - deb_pkg_instance_id = int(sys.argv[1]) - +def add_liveboot_request(deb_pkg_instance_id): logging.basicConfig() logger = logging.getLogger() @@ -119,3 +113,4 @@ if __name__ == "__main__": jenkins_uid = pwd.getpwnam("jenkins").pw_uid insert_liveboot_request(con, jenkins_uid, def_pkg_list_id) con.commit() + return