Commit 70aa83f9 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

In separate commit, fix DBQueryFatal() vs DBQuery() flipflop.

parent bcc9a7e0
......@@ -49,7 +49,7 @@ def TBDBConnect():
else:
raise RuntimeError, "Cannot connect to DB after several attempts!"
def DBQueryFatal(queryPat, querySub = (), asDict = False):
def DBQuery(queryPat, querySub = (), asDict = False):
TBDBConnect()
if asDict:
......@@ -84,9 +84,9 @@ def DBQueryFatal(queryPat, querySub = (), asDict = False):
SENDMAIL(TBOPS, "DB query failed", "DB query failed:\n\n%s" % tbmsg, TBOPS)
raise RuntimeError, "Aah! Escaped DBQueryFatal loop"
def DBQuery(*args):
def DBQueryFatal(*args):
try:
ret = DBQueryFatal(*args)
ret = DBQuery(*args)
return ret
except MySQLdb.MySQLError:
return None
......
......@@ -49,7 +49,7 @@ def TBDBConnect():
else:
raise RuntimeError, "Cannot connect to DB after several attempts!"
def DBQueryFatal(queryPat, querySub = (), asDict = False):
def DBQuery(queryPat, querySub = (), asDict = False):
TBDBConnect()
if asDict:
......@@ -84,9 +84,9 @@ def DBQueryFatal(queryPat, querySub = (), asDict = False):
SENDMAIL(TBOPS, "DB query failed", "DB query failed:\n\n%s" % tbmsg, TBOPS)
raise RuntimeError, "Aah! Escaped DBQueryFatal loop"
def DBQuery(*args):
def DBQueryFatal(*args):
try:
ret = DBQueryFatal(*args)
ret = DBQuery(*args)
return ret
except MySQLdb.MySQLError:
return None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment