Fix format string sometimes causing delayed evaluation issues

This commit is contained in:
allegroai 2022-07-04 11:53:40 +03:00
parent a492ee50fb
commit a486881a56

View File

@ -844,15 +844,14 @@ class StorageHelper(object):
if dest_path.startswith('http'):
return True
err_msg = 'Insufficient permissions ({} failed) for ' + base_url
try:
self.upload_from_stream(stream=six.BytesIO(b'clearml'), dest_path=dest_path)
except Exception:
raise ValueError(err_msg.format("write"))
raise ValueError('Insufficient permissions (write failed) for {}'.format(base_url))
try:
self.delete(path=dest_path)
except Exception:
raise ValueError(err_msg.format("delete"))
raise ValueError('Insufficient permissions (delete failed) for {}'.format(base_url))
return True
@classmethod