Skip to content

Commit

Permalink
Fix utils test error (revert a change)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhmdk0 committed Dec 8, 2024
1 parent 3518f39 commit 27400d6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cli/medperf/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,9 @@ def untar(filepath: str, remove: bool = True) -> str:
logging.info(f"Uncompressing tar.gz at {filepath}")
addpath = str(Path(filepath).parent)
try:
with tarfile.open(filepath) as tar:
tar.extractall(addpath)
tar = tarfile.open(filepath)
tar.extractall(addpath)
tar.close()
except tarfile.ReadError as e:
raise ExecutionError("Cannot extract tar.gz file, " + e.__str__())

Expand Down

0 comments on commit 27400d6

Please sign in to comment.