mirror of
https://github.com/clearml/clearml-agent
synced 2025-03-03 02:32:17 +00:00
Fix incorrect check for spaces in current execution folder (only check in cache folders)
This commit is contained in:
parent
6a24da2849
commit
28f47419b0
@ -672,7 +672,7 @@ class Worker(ServiceCommandSection):
|
||||
|
||||
def check(self, **_):
|
||||
try:
|
||||
check_directory_path(str(Path(".").resolve()))
|
||||
check_directory_path(str(Path(".").resolve()), check_whitespace_in_path=False)
|
||||
except OSError as e:
|
||||
if e.errno == errno.ENOENT:
|
||||
raise CommandFailedError("current working directory does not exist")
|
||||
|
@ -459,9 +459,9 @@ def chain_map(*args):
|
||||
return reduce(lambda x, y: x.update(y) or x, args, {})
|
||||
|
||||
|
||||
def check_directory_path(path):
|
||||
def check_directory_path(path, check_whitespace_in_path=True):
|
||||
message = 'Could not create directory "{}": {}'
|
||||
if not is_windows_platform():
|
||||
if not is_windows_platform() and check_whitespace_in_path:
|
||||
match = re.search(r'\s', path)
|
||||
if match:
|
||||
raise CommandFailedError(
|
||||
|
Loading…
Reference in New Issue
Block a user