From 24247d187f7cdab39955c70c03444ba482223708 Mon Sep 17 00:00:00 2001 From: "duncan.parkes" Date: Sun, 8 Mar 2009 20:14:12 +0000 Subject: [PATCH] Remove pdb trace and fix authority insert query. --- deployment_script_common | 1 - generateCGIScripts.py | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/deployment_script_common b/deployment_script_common index 9b771ba..537abbd 100644 --- a/deployment_script_common +++ b/deployment_script_common @@ -38,7 +38,6 @@ echo "Done" echo echo "Enter mysql db name:" read MYSQL_DB_NAME -echo $MYSQL_DB_NAME export MYSQL_DB_NAME echo "Enter mysql username:" read MYSQL_USERNAME diff --git a/generateCGIScripts.py b/generateCGIScripts.py index 1246203..73ecd90 100755 --- a/generateCGIScripts.py +++ b/generateCGIScripts.py @@ -48,8 +48,6 @@ csv_reader = csv.DictReader( template= open(template_filename).read() # Get a mysql cursor -import pdb;pdb.set_trace() - mysql_connection = MySQLdb.connect( db=environ['MYSQL_DB_NAME'], user=environ['MYSQL_USERNAME'], @@ -65,7 +63,7 @@ php_scraper_location = "/scrapers/%(php_scraper)s.php?day={day}&month={month}&ye authority_select_query = "SELECT * FROM authority WHERE short_name = '%(short_name)s';" # FIXME: Both of these queries should set planning_email and notes. -authority_insert_query = 'INSERT INTO authority (full_name, short_name, feed_url, external, disabled) values ("%(full_name)s", "%(short_name)s", "%(feed_url)s", %(external)s, %(disabled)s);' +authority_insert_query = 'INSERT INTO authority (full_name, short_name, feed_url, external, disabled, planning_email) values ("%(full_name)s", "%(short_name)s", "%(feed_url)s", %(external)s, %(disabled)s, "%(planning_email)s");' authority_update_query = 'UPDATE authority SET full_name="%(full_name)s", external="%(external)s", disabled=%(disabled)s, feed_url="%(feed_url)s", external=%(external)s WHERE short_name = "%(short_name)s";' for site_dict in csv_reader: