Skip to content

Commit b69ecb8

Browse files
committed
Don't try to use .__name__ unless really needed
1 parent 611ba5c commit b69ecb8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

simvue/run.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,11 @@ def __enter__(self):
161161
return self
162162

163163
def __exit__(self, type, value, traceback):
164-
name = type.__name__
165164
if self._name and self._status == 'running':
166165
if not type:
167166
self.set_status('completed')
168167
else:
169-
self.log_event(f"{name}: {value}")
168+
self.log_event(f"{type.__name__}: {value}")
170169
if type.__name__ in ('KeyboardInterrupt'):
171170
self.set_status('terminated')
172171
else:

0 commit comments

Comments
 (0)