mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-19 11:42:43 +00:00
Python 3.7 compatible
This commit is contained in:
parent
2c651021e4
commit
d204e3aa7f
@ -417,8 +417,14 @@ def garbage_collect():
|
||||
|
||||
if DELETE_OLD:
|
||||
narinfo = parse_narinfo(path.read_text())
|
||||
path.unlink(missing_ok=True)
|
||||
(working_dir / STORE_DIR / narinfo['URL']).unlink(missing_ok=True)
|
||||
try:
|
||||
path.unlink()
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
(working_dir / STORE_DIR / narinfo['URL']).unlink()
|
||||
except:
|
||||
pass
|
||||
|
||||
if DELETE_OLD:
|
||||
logging.info(f' - {deleted} paths deleted')
|
||||
|
Loading…
x
Reference in New Issue
Block a user