Skip to content

Commit

Permalink
change dir copy to file
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoLisin committed Oct 2, 2023
1 parent 76e343f commit 988f202
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions agent/worker/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import hashlib
import re
from supervisely_lib.io.docker_utils import PullPolicy
from supervisely_lib.io.fs import copy_dir_recursively


_AGENT_HOST_DIR = "AGENT_HOST_DIR"
Expand Down Expand Up @@ -509,8 +508,9 @@ def init_constants():
sly.fs.mkdir(SUPERVISELY_SYNCED_APP_DATA_CONTAINER())

if REQUESTS_CA_BUNDLE() is not None:
sly.fs.mkdir(MOUNTED_REQUESTS_CA_BUNDLE())
sly.fs.copy_dir_recursively(
REQUESTS_CA_BUNDLE(),
MOUNTED_REQUESTS_CA_BUNDLE(),
)
if os.path.dirname(REQUESTS_CA_BUNDLE()) != MOUNTED_REQUESTS_CA_BUNDLE():
filename = sly.fs.get_file_name_with_ext(REQUESTS_CA_BUNDLE())
sly.fs.mkdir(MOUNTED_REQUESTS_CA_BUNDLE())
sly.fs.copy_file(
REQUESTS_CA_BUNDLE(), os.path.join(MOUNTED_REQUESTS_CA_BUNDLE(), filename)
)

0 comments on commit 988f202

Please sign in to comment.