[Blends-commit] r3466 - /blends/trunk/webtools/blendstasktools.py

tille at users.alioth.debian.org tille at users.alioth.debian.org
Wed Jul 4 15:12:54 UTC 2012


Author: tille
Date: Wed Jul  4 15:12:54 2012
New Revision: 3466

URL: http://svn.debian.org/wsvn/blends/?sc=1&rev=3466
Log:
Deal with the new method to access UDD from Alioth

Modified:
    blends/trunk/webtools/blendstasktools.py

Modified: blends/trunk/webtools/blendstasktools.py
URL: http://svn.debian.org/wsvn/blends/blends/trunk/webtools/blendstasktools.py?rev=3466&op=diff
==============================================================================
--- blends/trunk/webtools/blendstasktools.py (original)
+++ blends/trunk/webtools/blendstasktools.py Wed Jul  4 15:12:54 2012
@@ -14,6 +14,7 @@
 # from tasks file about home page, license, WNPP etc.
 
 PORT=5441
+UDDPORT=5452
 DEFAULTPORT=5432
 
 from sys import stderr, exit
@@ -263,8 +264,11 @@
 ###########################################################################################
 # Define several prepared statements to query UDD
 try:
-    conn = psycopg2.connect(host="localhost",port=PORT,user="guest",database="udd")
+  conn = psycopg2.connect(host="localhost",port=PORT,user="guest",database="udd")
 except psycopg2.OperationalError, err:
+  try:
+    conn = psycopg2.connect(host="udd.debian.org",port=UDDPORT,user="guest",database="udd")
+  except psycopg2.OperationalError, err:
     # logger not known at this state: logger.warning
     print >>stderr, "PostgreSQL does not seem to run on port %i .. trying default port %i.\n\tMessage: %s" % (PORT, DEFAULTPORT, str(err))
     try:




More information about the Blends-commit mailing list