Skip to content

Commit

Permalink
fix decompress_file() if no compressed file found
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Aug 7, 2023
1 parent 02340e4 commit e211655
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions monty/shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ def decompress_file(filepath) -> str:
with zopen(filepath, "rb") as f_in, open(out_file, "wb") as f_out:
f_out.writelines(f_in)
os.remove(filepath)
else:
out_file = filepath

Check warning on line 117 in monty/shutil.py

View check run for this annotation

Codecov / codecov/patch

monty/shutil.py#L117

Added line #L117 was not covered by tests

return out_file

Expand Down

0 comments on commit e211655

Please sign in to comment.