Add exception handling when no output uri credentials are found

This commit is contained in:
allegroai 2019-10-06 21:57:17 +03:00
parent 8f0bec5861
commit 0a5696235b

View File

@ -491,6 +491,9 @@ class Task(_Task):
if value and value != self.storage_uri:
from .storage.helper import StorageHelper
helper = StorageHelper.get(value)
if not helper:
raise ValueError("Could not get access credentials for '{}' "
", check configuration file ~/trains.conf".format(value))
helper.check_write_permissions(value)
self.storage_uri = value