Skip to content

Commit

Permalink
added filter argument to tar.extactall when extracting downloaded fil…
Browse files Browse the repository at this point in the history
…e incontainer.download()
  • Loading branch information
Soufiane Jounaid committed Mar 19, 2024
1 parent dde1902 commit 6e7f000
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chi/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def create_container(
kwargs["exposed_ports"] = exposed_ports

# Note: most documented args are not on the function signature because there is some special
# handling of it in the Zun client; it is not sent if it is not on kwargs.
# handling of it in the Zu n client; it is not sent if it is not on kwargs.
# If it is on kwargs it is expected to be non-None.
container = zun().containers.create(
name=name,
Expand Down Expand Up @@ -236,7 +236,7 @@ def download(container_ref: "str", source: "str", dest: "str"):
res = zun().containers.get_archive(container_ref, source)
fd = io.BytesIO(res["data"])
with tarfile.open(fileobj=fd, mode="r") as tar:
tar.extractall(dest)
tar.extractall(dest, filter="fully_trusted")


def wait_for_active(container_ref: "str", timeout: int = (60 * 2)) -> "Container":
Expand Down

0 comments on commit 6e7f000

Please sign in to comment.