Skip to content

Commit

Permalink
Fix occasional error when 'has_logged' was not populated in logging s…
Browse files Browse the repository at this point in the history
…cope properties.
  • Loading branch information
matthewwardrop committed Jun 3, 2020
1 parent c363abd commit 79d7776
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion omniduct/utils/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def _scope_exit(self, success=True):
print("\t" * len(self.__scopes) + "Exited manual scope: {}".format(scope['name']), file=sys.stderr)
elif 'has_logged' in scope:
if len(self.__scopes) != 0:
self.current_scope_props['has_logged'] = self.current_scope_props.get('has_logged') or props['has_logged']
self.current_scope_props['has_logged'] = self.current_scope_props.get('has_logged') or props.get('has_logged', False)

def __get_time(self, seconds):
m, s = divmod(seconds, 60)
Expand Down

0 comments on commit 79d7776

Please sign in to comment.