Skip to content

Commit 2818a2d

Browse files
committed
remove else statement
1 parent 4d77310 commit 2818a2d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

runtimes/v1/azure_functions_runtime_v1/utils/tracing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def marshall_exception_trace(exc: Exception) -> str:
2929
if '<frozen importlib._bootstrap>' not in line and \
3030
'<frozen importlib._bootstrap_external>' not in line:
3131
filtered_lines.append(line)
32-
return ''.join(filtered_lines) if filtered_lines else ''.join(
33-
full_traceback)
32+
if filtered_lines:
33+
return ''.join(filtered_lines)
3434

3535
return ''.join(full_traceback)
3636
except Exception as sub_exc:

runtimes/v2/azure_functions_runtime/utils/tracing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def marshall_exception_trace(exc: Exception) -> str:
2929
if '<frozen importlib._bootstrap>' not in line and \
3030
'<frozen importlib._bootstrap_external>' not in line:
3131
filtered_lines.append(line)
32-
return ''.join(filtered_lines) if filtered_lines else ''.join(
33-
full_traceback)
32+
if filtered_lines:
33+
return ''.join(filtered_lines)
3434

3535
return ''.join(full_traceback)
3636
except Exception as sub_exc:

workers/azure_functions_worker/utils/tracing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def marshall_exception_trace(exc: Exception) -> str:
2929
if '<frozen importlib._bootstrap>' not in line and \
3030
'<frozen importlib._bootstrap_external>' not in line:
3131
filtered_lines.append(line)
32-
return ''.join(filtered_lines) if filtered_lines else ''.join(
33-
full_traceback)
32+
if filtered_lines:
33+
return ''.join(filtered_lines)
3434

3535
return ''.join(full_traceback)
3636
except Exception as sub_exc:

0 commit comments

Comments
 (0)