test/clean.py: minor fix
This commit is contained in:
parent
cd9f00ee48
commit
945f15fe8f
2 changed files with 4 additions and 5 deletions
|
|
@ -53,8 +53,3 @@ extra_dirs = [
|
|||
]
|
||||
|
||||
clean(clean_cfgs, extra_dirs=extra_dirs)
|
||||
|
||||
for d in extra_dirs:
|
||||
if os.path.exists(d) and not os.path.isdir(d):
|
||||
print(f'Removing non-directory ‘{d}’')
|
||||
os.unlink(d)
|
||||
|
|
|
|||
|
|
@ -177,6 +177,10 @@ def clean(cfgs, tmpdir_ids=None, extra_dirs=[]):
|
|||
fmt_list(cleaned, fmt=list_fmt)
|
||||
)))
|
||||
|
||||
for d in extra_dirs:
|
||||
if (os.path.exists(d) or os.path.islink(d)) and not os.path.isdir(d):
|
||||
print(f'Removing non-directory ‘{d}’')
|
||||
os.unlink(d)
|
||||
|
||||
def get_tmpfile(cfg,fn):
|
||||
return os.path.join(cfg['tmpdir'],fn)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue