[Blends-commit] r2746 - /blends/trunk/team_analysis_tools/maintain_names_prefered.py

tille at users.alioth.debian.org tille at users.alioth.debian.org
Sun Apr 10 06:52:10 UTC 2011


Author: tille
Date: Sun Apr 10 06:51:59 2011
New Revision: 2746

URL: http://svn.debian.org/wsvn/blends/?sc=1&rev=2746
Log:
Ensure proper connection if postgresql port is not defaultport

Modified:
    blends/trunk/team_analysis_tools/maintain_names_prefered.py

Modified: blends/trunk/team_analysis_tools/maintain_names_prefered.py
URL: http://svn.debian.org/wsvn/blends/blends/trunk/team_analysis_tools/maintain_names_prefered.py?rev=2746&op=diff
==============================================================================
--- blends/trunk/team_analysis_tools/maintain_names_prefered.py (original)
+++ blends/trunk/team_analysis_tools/maintain_names_prefered.py Sun Apr 10 06:51:59 2011
@@ -131,6 +131,14 @@
 except psycopg2.OperationalError:
     print >>stderr, "Problem connecting to UDD"
     exit(-1)
+try:
+    conn = psycopg2.connect(database="udd")
+except psycopg2.OperationalError:
+    try:
+	conn = psycopg2.connect(port=PORT,database="udd")
+    except psycopg2.OperationalError:
+        print >>stderr, "Problem connecting to UDD"
+	exit(-1)
 curs = conn.cursor()
 
 # Check what name is used how often




More information about the Blends-commit mailing list