Ensure we have an exception and capture the exc_info.

This commit is contained in:
Joshua Harlow
2013-06-03 21:19:44 -07:00
parent 35c75ecc44
commit 5e0e49eefb

View File

@@ -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):