mirror of
https://github.com/clearml/clearml-agent
synced 2025-01-31 00:56:53 +00:00
Handle OSError when checking for is_file (#215)
This commit is contained in:
parent
a88487ff25
commit
bf8d9c96e9
@ -3198,7 +3198,11 @@ class Worker(ServiceCommandSection):
|
|||||||
execution.working_dir = execution.working_dir or "."
|
execution.working_dir = execution.working_dir or "."
|
||||||
|
|
||||||
# fix our import patch (in case we have __future__)
|
# fix our import patch (in case we have __future__)
|
||||||
if script_file and script_file.is_file():
|
try:
|
||||||
|
is_file = script_file and script_file.is_file()
|
||||||
|
except OSError:
|
||||||
|
is_file = False
|
||||||
|
if is_file:
|
||||||
fix_package_import_diff_patch(script_file.as_posix())
|
fix_package_import_diff_patch(script_file.as_posix())
|
||||||
|
|
||||||
if is_literal_script and not has_repository:
|
if is_literal_script and not has_repository:
|
||||||
|
Loading…
Reference in New Issue
Block a user