Reestablished working state
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -9,33 +9,19 @@ from .skipstep import skipStep
|
||||
|
||||
def buildOperation(definition):
|
||||
actions = definition.actions
|
||||
|
||||
# responses = []
|
||||
#print("DEBUG", actions)
|
||||
responses = []
|
||||
outputs = {}
|
||||
|
||||
for action in actions:
|
||||
try:
|
||||
if hasattr(definition, "skipstep"):
|
||||
if skipStep(definition, action, outputs):
|
||||
continue
|
||||
#try:
|
||||
if hasattr(definition, "skipstep"):
|
||||
if skipStep(definition, action, outputs):
|
||||
continue
|
||||
|
||||
outputs, response = buildAction(action, outputs)
|
||||
# responses.append(response)
|
||||
|
||||
except Exception as error:
|
||||
outputs = manageFailure(error, action, outputs)
|
||||
|
||||
# if hasattr(action, "cookies"):
|
||||
# for cookiename, cookie, in cookies:
|
||||
|
||||
# session.cookies.set(
|
||||
# cookiename,
|
||||
# outputs[cookie],
|
||||
# domain=domainname
|
||||
# )
|
||||
|
||||
# print(
|
||||
# {outputs[cookie]},
|
||||
# domain,
|
||||
# cookiename,
|
||||
# )
|
||||
outputs, response = buildAction(action, outputs)
|
||||
responses.append(response)
|
||||
|
||||
#except Exception as error:
|
||||
#outputs = manageFailure(error, action, outputs)
|
||||
return outputs
|
||||
|
||||
@@ -2,13 +2,19 @@ def skipStep(definition, action, outputs):
|
||||
try:
|
||||
if action in definition.skipstep:
|
||||
condition = definition.skipstep[action]
|
||||
|
||||
|
||||
#if outputs.get([condition["output"]]) is None:
|
||||
#return False
|
||||
#current_value = 1
|
||||
#else:
|
||||
current_value = outputs[condition["output"]]
|
||||
#current_value = 1
|
||||
|
||||
if condition["operator"] == ">=":
|
||||
if current_value >= condition["value"]:
|
||||
print(f"Skipping {action.name}")
|
||||
return True
|
||||
|
||||
except TypeError, KeyError:
|
||||
except KeyError:
|
||||
#outputs = manageFailure(error)
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user