Fix getattr will throw exception (issue #426)

This commit is contained in:
allegroai 2021-08-20 00:35:13 +03:00
parent 5295708e18
commit 922e8b5e74
2 changed files with 5 additions and 1 deletions

View File

@ -406,7 +406,7 @@ class ClearmlJob(object):
# currently we do not add the docker image to the hash (only args and setup script),
# because default docker image will cause the step to change
docker = None
if getattr(task.data, 'container'):
if hasattr(task.data, 'container'):
docker = dict(**(task.data.container or dict()))
docker.pop('image', None)

View File

@ -83,6 +83,10 @@ class Session(TokenManager):
def secret_key(self):
return self.__secret_key
@property
def auth_token(self):
return self.__auth_token
@property
def host(self):
return self.__host