summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2013-06-03 21:21:44 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2013-06-03 21:21:44 -0700
commit814a187004839b758b62d217e725fc7e24b072e8 (patch)
treeb6f4af4c0987bf5a6f7fc4624952037a32f5e970
parentfd627447da79e3b833588594c8b7681771a890ae (diff)
parent5e0e49eefbe0a477c66edd3fef610c90bdf27d3a (diff)
downloadtaskflow-814a187004839b758b62d217e725fc7e24b072e8.tar.gz
Merge pull request #30 from harlowja/ensure-excp
Ensure we have an exception and capture the exc_info.
-rw-r--r--taskflow/patterns/ordered_flow.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/taskflow/patterns/ordered_flow.py b/taskflow/patterns/ordered_flow.py
index 980d9bb..96c9421 100644
--- a/taskflow/patterns/ordered_flow.py
+++ b/taskflow/patterns/ordered_flow.py
@@ -21,6 +21,7 @@ import collections
import copy
import functools
import logging
+import sys
from taskflow.openstack.common import excutils
from taskflow import exceptions as exc
@@ -34,10 +35,11 @@ class FlowFailure(object):
"""When a task failure occurs the following object will be given to revert
and can be used to interrogate what caused the failure."""
- def __init__(self, task, flow, exception=None):
+ def __init__(self, task, flow, exception):
self.task = task
self.flow = flow
- self.exception = exception
+ self.exc = exception
+ self.exc_info = sys.exc_info()
class RollbackTask(object):