mirror of
https://github.com/clearml/clearml
synced 2025-02-12 07:35:08 +00:00
Add exception guard
This commit is contained in:
parent
02ba0e28d5
commit
8a1e31c4f0
@ -134,7 +134,11 @@ class IdObjectBase(InterfaceBase):
|
||||
def reload(self):
|
||||
if not self.id:
|
||||
raise ValueError('Failed reloading %s: missing id' % type(self).__name__)
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
self._data = self._reload()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def normalize_id(cls, id):
|
||||
|
@ -28,6 +28,8 @@ class TaskStopSignal(object):
|
||||
self._task_reset_state_counter = 0
|
||||
|
||||
def test(self):
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
status = self.task.status
|
||||
message = self.task.data.status_message
|
||||
|
||||
@ -54,3 +56,5 @@ class TaskStopSignal(object):
|
||||
)
|
||||
else:
|
||||
self._task_reset_state_counter = 0
|
||||
except Exception:
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user