From 370defe26443e9cadacbcf1c8d0102a84cc2c06e Mon Sep 17 00:00:00 2001 From: Jonas Lindstad Date: Thu, 19 Feb 2015 04:52:14 +0100 Subject: updates 'last_config_fetch' when DHCP client fetches config --- junos-bootstrap/httpd/server_http.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'junos-bootstrap/httpd/server_http.py') diff --git a/junos-bootstrap/httpd/server_http.py b/junos-bootstrap/httpd/server_http.py index 982283f..000bd41 100644 --- a/junos-bootstrap/httpd/server_http.py +++ b/junos-bootstrap/httpd/server_http.py @@ -35,11 +35,11 @@ def main(): connect_params = ("dbname='%s' user='%s' host='%s' password='%s'" % (settings['db']['dbname'], settings['db']['user'], settings['db']['host'], settings['db']['password'])) conn = psycopg2.connect(connect_params) cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) - cur.execute("""SELECT * from switches""") - rows = cur.fetchall() - print ("\nSwitches in DB during server_http.py startup:") - for row in rows: - print (" --> %s, connected to %s port %s" % (row['hostname'], row['distro_name'], row['distro_phy_port'])) + # cur.execute("""SELECT * from switches""") + # rows = cur.fetchall() + # print ("\nSwitches in DB during server_http.py startup:") + # for row in rows: + # print (" --> %s, connected to %s port %s" % (row['hostname'], row['distro_name'], row['distro_phy_port'])) except (psycopg2.DatabaseError, psycopg2.OperationalError) as e: print ('Error: %s' % e) -- cgit v1.2.3