Skip to content

Commit

Permalink
fix: avoid os.system
Browse files Browse the repository at this point in the history
  • Loading branch information
Psycojoker committed Jan 17, 2025
1 parent 6e8c6b7 commit 4344abc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/aleph_client/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import logging
import os
import re
import subprocess
from functools import partial, wraps
from pathlib import Path
from shutil import make_archive
Expand Down Expand Up @@ -44,7 +45,7 @@ def create_archive(path: Path) -> tuple[Path, Encoding]:
if settings.CODE_USES_SQUASHFS:
logger.debug("Creating squashfs archive...")
archive_path = Path(f"{path}.squashfs")
os.system(f"mksquashfs {path} {archive_path} -noappend")
subprocess.check_call(["/usr/bin/mksquashfs", path, archive_path, "-noappend"])
assert archive_path.is_file()
return archive_path, Encoding.squashfs
else:
Expand Down

0 comments on commit 4344abc

Please sign in to comment.