Skip to content

Commit

Permalink
scripts: check if dl directory exist in dl_cleanup script
Browse files Browse the repository at this point in the history
Check if the provided dl directory exist and return on error.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
  • Loading branch information
Ansuel authored and aparcar committed Jul 6, 2021
1 parent e4cfefa commit 64ce35b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/dl_cleanup.py
Expand Up @@ -169,6 +169,11 @@ def main(argv):
usage()
return 1
directory = args[0]

if not os.path.exists(directory):
print("Can't find dl path", directory)
return 1

for (o, v) in opts:
if o in ("-h", "--help"):
usage()
Expand Down

0 comments on commit 64ce35b

Please sign in to comment.