summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Callaghan <dcallagh@redhat.com>2011-03-11 15:56:52 +1000
committerGerrit Code Review <gerrit@maeby.djc.id.au>2011-03-11 15:56:52 +1000
commitcbdbe353c700f8ae1aeaad1e759eae4d26b8ae08 (patch)
tree71b376d26e9a604fc6e46c7360d32311275bb08f
parentbd864e237d14708f14c60b4bcec7cb32a3b972e4 (diff)
parent22d0f05f4f81978088bbd518347708d4d275e7e0 (diff)
Merge "use log.exception instead of log.error, so that we get stack traces in the logs" into develop
-rwxr-xr-xServer/bkr/server/tools/beakerd.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Server/bkr/server/tools/beakerd.py b/Server/bkr/server/tools/beakerd.py
index ae3a7ec..489a370 100755
--- a/Server/bkr/server/tools/beakerd.py
+++ b/Server/bkr/server/tools/beakerd.py
@@ -132,9 +132,9 @@ def new_recipes(*args):
else:
recipe.recipeset.abort('Recipe ID %s does not have a distro' % recipe.id)
session.commit()
- except exceptions.Exception, e:
+ except exceptions.Exception:
session.rollback()
- log.error("Failed to commit due to :%s" % e)
+ log.exception("Failed to commit in new_recipes")
session.close()
log.debug("Exiting new_recipes routine")
return True
@@ -248,9 +248,9 @@ def processed_recipesets(*args):
recipe.recipeset.abort('Recipe ID %s does not match any systems' % recipe.id)
session.commit()
- except exceptions.Exception, e:
+ except exceptions.Exception:
session.rollback()
- log.error("Failed to commit due to :%s" % e)
+ log.exception("Failed to commit in processed_recipes")
session.close()
log.debug("Exiting processed_recipes routine")
return True
@@ -392,9 +392,9 @@ def queued_recipes(*args):
# back into queued state and try again.
raise BX(_('System %s was stolen from underneath us. will try again.' % system))
session.commit()
- except exceptions.Exception, e:
+ except exceptions.Exception:
session.rollback()
- log.error("Failed to commit due to :%s" % e)
+ log.exception("Failed to commit in queued_recipes")
session.close()
log.debug("Exiting queued_recipes routine")
return True
@@ -496,9 +496,9 @@ def scheduled_recipes(*args):
e))
session.commit()
- except exceptions.Exception, e:
+ except exceptions.Exception:
session.rollback()
- log.error("Failed to commit due to :%s" % e)
+ log.exception("Failed to commit in scheduled_recipes")
session.close()
log.debug("Exiting scheduled_recipes routine")
return True