Author: nunofsantos
Date: 2008-05-14 16:18:00 -0400 (Wed, 14 May 2008)
New Revision: 2050
Modified:
mgmt/mint/python/mint/__init__.py
Log:
BZ 446480: catch the malformed SQL exception, still need to be handled/prevented properly
Modified: mgmt/mint/python/mint/__init__.py
===================================================================
--- mgmt/mint/python/mint/__init__.py 2008-05-14 10:23:20 UTC (rev 2049)
+++ mgmt/mint/python/mint/__init__.py 2008-05-14 20:18:00 UTC (rev 2050)
@@ -387,6 +387,10 @@
except KeyError, detail:
self.log("Schema mismatch: %s" % detail)
return
+ except ProgrammingError, detail:
+ # XXX FIX
+ self.log("SQL syntax error: %s" % detail)
+ return
self.log("END
CONFIG---------------------------------------------------\n")
return obj
@@ -415,7 +419,13 @@
except TypeError, detail:
self.log("Schema mismatch: %s" % detail)
- objStats.syncUpdate()
+ try:
+ objStats.syncUpdate()
+ except ProgrammingError, detail
+ # XXX FIX
+ self.log("SQL syntax error: %s" % detail)
+ return
+
d = dict()
if (timestamps[2] != 0):
d["deletionTime"] = datetime.fromtimestamp(timestamps[2]/1000000000)
@@ -426,8 +436,14 @@
obj.set(**d)
except TypeError, detail:
self.log("Schema mismatch: %s" % detail)
+
+ try:
+ obj.syncUpdate()
+ except ProgrammingError, detail:
+ # XXX FIX
+ self.log("SQL syntax error: %s" % detail)
+ return
- obj.syncUpdate()
self.log("END INST---------------------------------------------------\n")
return objStats
Show replies by date