better solution 1602, thanks Alan
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.6.0-development+timestamp.2013.07.23.02.04.35
|
Version 2.6.0-development+timestamp.2013.07.23.08.39.39
|
||||||
|
|||||||
+8
-1
@@ -679,6 +679,11 @@ class BaseAdapter(ConnectionPool):
|
|||||||
'big-reference': 'BIGINT REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
|
'big-reference': 'BIGINT REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def isOperationalError(self,exception):
|
||||||
|
if not hasattr(self.driver, "OperationalError"):
|
||||||
|
return None
|
||||||
|
return isinstance(exception, self.driver.OperationalError)
|
||||||
|
|
||||||
def id_query(self, table):
|
def id_query(self, table):
|
||||||
return table._id != None
|
return table._id != None
|
||||||
|
|
||||||
@@ -4324,7 +4329,9 @@ class DatabaseStoredFile:
|
|||||||
try:
|
try:
|
||||||
if db.executesql(query):
|
if db.executesql(query):
|
||||||
return True
|
return True
|
||||||
except Exception:
|
except Exception, e:
|
||||||
|
if not db._adapter.isOperationalError(e):
|
||||||
|
raise
|
||||||
# no web2py_filesystem found?
|
# no web2py_filesystem found?
|
||||||
tb = traceback.format_exc()
|
tb = traceback.format_exc()
|
||||||
LOGGER.error("Could not retrieve %s\n%s" % (filename, tb))
|
LOGGER.error("Could not retrieve %s\n%s" % (filename, tb))
|
||||||
|
|||||||
Reference in New Issue
Block a user