delayed-rm 2.8.2__tar.gz → 2.9.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: delayed_rm
3
- Version: 2.8.2
3
+ Version: 2.9.1
4
4
  Summary: Ever wish you had a few minutes to undo an rm? Now you do!
5
5
  License: GPLv3
6
6
  Project-URL: Homepage, https://github.com/zwimer/delayed_rm
@@ -12,7 +12,7 @@ import sys
12
12
  import os
13
13
 
14
14
 
15
- __version__ = "2.8.2"
15
+ __version__ = "2.9.1"
16
16
 
17
17
 
18
18
  #
@@ -214,12 +214,7 @@ def delayed_rm_raw(delay: int, log: bool, r: bool, f: bool, paths: list[Path]) -
214
214
  if r or f or paths:
215
215
  _eprint("--log may not be used with other arguments")
216
216
  return False
217
- if log_f.exists():
218
- with log_f.open("r") as file:
219
- data: str = file.read()
220
- print(data + f"Log file: {log_f}")
221
- else:
222
- print("Log is empty")
217
+ print(f"{log_f.read_text()}Log file: {log_f}" if log_f.exists() else "Log is empty")
223
218
  return True
224
219
  if not paths:
225
220
  _eprint("nothing to remove")
@@ -239,7 +234,7 @@ def main(prog: str, *args: str) -> bool:
239
234
  base: str = os.path.basename(prog)
240
235
  parser = argparse.ArgumentParser(prog=base)
241
236
  parser.add_argument("--version", action="version", version=f"{base} {__version__}")
242
- parser.add_argument("-d", "--delay", type=int, default=900, help="The deletion delay in seconds")
237
+ parser.add_argument("--delay", "--ttl", type=int, default=900, help="The deletion delay in seconds")
243
238
  parser.add_argument(
244
239
  "--log", action="store_true", help=f"Show {base}'s log files; may not be used with other arguments"
245
240
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: delayed_rm
3
- Version: 2.8.2
3
+ Version: 2.9.1
4
4
  Summary: Ever wish you had a few minutes to undo an rm? Now you do!
5
5
  License: GPLv3
6
6
  Project-URL: Homepage, https://github.com/zwimer/delayed_rm
File without changes
File without changes
File without changes
File without changes