Skip to content

Commit 0d4d47b

Browse files
committed
Refactor - better org + line linting pass
1 parent 28850fe commit 0d4d47b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

azure/durable_functions/models/TaskOrchestrationExecutor.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,13 +285,19 @@ def get_orchestrator_state_str(self) -> str:
285285
except Exception as e:
286286
self.output = None
287287
self.exception = e
288+
289+
exception_str = None
290+
if self.exception is not None:
291+
exception_str = str(self.exception)
292+
if not exception_str:
293+
exception_str = str(type(self.exception))
288294

289295
state = OrchestratorState(
290296
is_done=self.orchestration_invocation_succeeded,
291297
actions=self.context._actions,
292298
output=self.output,
293299
replay_schema=self.context._replay_schema,
294-
error=None if self.exception is None else (str(type(self.exception)) if not str(self.exception) else str(self.exception)),
300+
error=exception_str,
295301
custom_status=self.context.custom_status
296302
)
297303

0 commit comments

Comments
 (0)