Working resolver, working recursive logic with dynamic library creation
This commit is contained in:
+14
-11
@@ -1,17 +1,20 @@
|
||||
import logging
|
||||
|
||||
def buildLog (action, outputs, response):
|
||||
#if response.status_code == 200:
|
||||
#print(f"{action.name} successful")
|
||||
try:
|
||||
for print_name, print_key in action.prints.items():
|
||||
print(
|
||||
f"{print_name}:",
|
||||
f"{outputs[print_key]}",
|
||||
)
|
||||
if hasattr(action, "prints"):
|
||||
try:
|
||||
for print_name, print_key in action.prints.items():
|
||||
print(
|
||||
f"{print_name}:",
|
||||
f"{outputs[print_key]}",
|
||||
)
|
||||
|
||||
except: (KeyError, TypeError)
|
||||
|
||||
if action.showstatus is True and response.status_code == 200:
|
||||
print(f"{action.name} successful")
|
||||
|
||||
elif action.showstatus is True and response.status_code != 200:
|
||||
print(f"{action.name} failed")
|
||||
|
||||
#else:
|
||||
#print(f"{action.name} failed")
|
||||
except: KeyError, TypeError
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user