Skip to content

Commit c250275

Browse files
#4074 Don't trap errors at log level 4
1 parent 3f7967a commit c250275

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

scripts/flow-runner.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,14 @@ def signalHandler(sig, frame):
205205
if 'arguments' in shared.flow[shared.step]['metadata']:
206206
arguments = shared.flow[shared.step]['metadata']['arguments']
207207

208-
try:
208+
if shared.LOGLEVEL == 4:
209209
result = globals()[method](arguments, shared.args.event)
210-
except Exception as e:
211-
eType, eObject, eTraceback = sys.exc_info()
212-
shared.log(0, f"ERROR: Module {fileName} failed on line {eTraceback.tb_lineno} - {e}")
210+
else:
211+
try:
212+
result = globals()[method](arguments, shared.args.event)
213+
except Exception as e:
214+
eType, eObject, eTraceback = sys.exc_info()
215+
shared.log(0, f"ERROR: Module {fileName} failed on line {eTraceback.tb_lineno} - {e}")
213216

214217
endTime = datetime.now()
215218
elapsedTime = (((endTime - startTime).total_seconds()) * 1000) / 1000

0 commit comments

Comments
 (0)