Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete error solved #180

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ The following people have made contributions to this project:
- [Panu Lahtinen (pnuu)](https://github.com/pnuu)
- [Lars Ørum Rasmussen (loerum)](https://github.com/loerum)
- [Martin Raspaud (mraspaud)](https://github.com/mraspaud)
- [Dario Stelitano (bornagain1981)] (https://github.com/bornagain1981)
4 changes: 2 additions & 2 deletions trollmoves/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ def unpack(pathname,
compression=None,
working_directory=None,
prog=None,
delete="False",
delete=False,
**kwargs):
"""Unpack *pathname*."""
del kwargs
Expand All @@ -945,7 +945,7 @@ def unpack(pathname,
except Exception:
LOGGER.exception("Could not decompress %s", pathname)
else:
if delete.lower() in ["1", "yes", "true", "on"]:
if delete in ["1", "yes", "true", "on"]:
Copy link
Member

@pnuu pnuu Sep 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work if delete is set to any value that evaluates as boolean True.

os.remove(pathname)
return new_path
return pathname
Expand Down