Re-add TimeoutException
This commit is contained in:
parent
e299f86d06
commit
27c733e281
|
@ -48,3 +48,7 @@ class OvsdbAppException(Exception):
|
|||
:returns: Always returns False.
|
||||
"""
|
||||
return False
|
||||
|
||||
|
||||
class TimeoutException(OvsdbAppException):
|
||||
message = "Commands %(commands)s exceeded timeout %(timeout)d seconds"
|
||||
|
|
|
@ -61,10 +61,8 @@ class Transaction(api.Transaction):
|
|||
try:
|
||||
result = self.results.get(timeout=self.timeout)
|
||||
except Queue.Empty:
|
||||
raise api.TimeoutException(
|
||||
"Commands %(commands)s exceeded timeout %(timeout)d "
|
||||
"seconds" % {'commands': self.commands,
|
||||
'timeout': self.timeout})
|
||||
raise api.TimeoutException(commands=self.commands,
|
||||
timeout=self.timeout)
|
||||
if isinstance(result, idlutils.ExceptionResult):
|
||||
if self.log_errors:
|
||||
LOG.error(result.tb)
|
||||
|
@ -161,10 +159,8 @@ class NeutronOVSDBTransaction(Transaction):
|
|||
self.api.idl.wait(self.ovsdb_connection.poller)
|
||||
self.ovsdb_connection.poller.block()
|
||||
else:
|
||||
raise api.TimeoutException(
|
||||
"Commands %(commands)s exceeded timeout %(timeout)d "
|
||||
"seconds post-commit" % {'commands': self.commands,
|
||||
'timeout': self.timeout})
|
||||
raise api.TimeoutException(commands=self.commands,
|
||||
timeout=self.timeout)
|
||||
|
||||
def post_commit_failed_interfaces(self, txn):
|
||||
failed = []
|
||||
|
|
Loading…
Reference in New Issue