delayed-rm 3.0.1__tar.gz → 3.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {delayed_rm-3.0.1 → delayed_rm-3.0.2}/PKG-INFO +1 -1
- {delayed_rm-3.0.1 → delayed_rm-3.0.2}/delayed_rm/delayed_rm.py +8 -8
- {delayed_rm-3.0.1 → delayed_rm-3.0.2}/delayed_rm.egg-info/PKG-INFO +1 -1
- {delayed_rm-3.0.1 → delayed_rm-3.0.2}/LICENSE +0 -0
- {delayed_rm-3.0.1 → delayed_rm-3.0.2}/README.md +0 -0
- {delayed_rm-3.0.1 → delayed_rm-3.0.2}/delayed_rm/__init__.py +0 -0
- {delayed_rm-3.0.1 → delayed_rm-3.0.2}/delayed_rm/py.typed +0 -0
- {delayed_rm-3.0.1 → delayed_rm-3.0.2}/delayed_rm.egg-info/SOURCES.txt +0 -0
- {delayed_rm-3.0.1 → delayed_rm-3.0.2}/delayed_rm.egg-info/dependency_links.txt +0 -0
- {delayed_rm-3.0.1 → delayed_rm-3.0.2}/delayed_rm.egg-info/entry_points.txt +0 -0
- {delayed_rm-3.0.1 → delayed_rm-3.0.2}/delayed_rm.egg-info/top_level.txt +0 -0
- {delayed_rm-3.0.1 → delayed_rm-3.0.2}/pyproject.toml +0 -0
- {delayed_rm-3.0.1 → delayed_rm-3.0.2}/setup.cfg +0 -0
|
@@ -13,7 +13,7 @@ import time
|
|
|
13
13
|
import sys
|
|
14
14
|
|
|
15
15
|
# Constants
|
|
16
|
-
__version__ = "3.0.
|
|
16
|
+
__version__ = "3.0.2"
|
|
17
17
|
_UNSAFE_FLAG = "unsafe-rmtree"
|
|
18
18
|
log_f: Path = Path.home().resolve() / ".delayed_rm.log"
|
|
19
19
|
tmp_d: Path = Path(gettempdir()).resolve() / ".delayed_rm"
|
|
@@ -195,18 +195,18 @@ def delayed_rm(paths: list[Path], delay: int, rf: bool, unsafe: bool = False) ->
|
|
|
195
195
|
_print_exc(e)
|
|
196
196
|
if edited:
|
|
197
197
|
_print_stderr(f"WARNING: Contents of {p} may have been PARTIALLY delayed_rm'd")
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
198
|
+
elif not new.exists(follow_symlinks=False):
|
|
199
|
+
pass
|
|
200
|
+
elif not _copytree:
|
|
201
|
+
new.unlink()
|
|
202
|
+
elif output := _rmtree(new):
|
|
203
|
+
_print_stderr(output)
|
|
204
204
|
finally:
|
|
205
205
|
any_edited |= edited
|
|
206
206
|
except KeyboardInterrupt:
|
|
207
207
|
ctrlc = True
|
|
208
208
|
# Inform user of failures
|
|
209
|
-
failed_plus: list[str] =
|
|
209
|
+
failed_plus: list[str] = list(map(str, failed))
|
|
210
210
|
if len(failed) > 0 and not ctrlc:
|
|
211
211
|
_print_exc(OSError("failed to rm:\n " + "\n ".join(failed_plus)))
|
|
212
212
|
# Log result
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|