scripts: check if dl directory exist in dl_cleanup script

Check if the provided dl directory exist and return on error.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
This commit is contained in:
Ansuel Smith 2021-07-06 00:59:40 +02:00 committed by Paul Spooren
parent e4cfefa9fc
commit 64ce35bfaf

View File

@ -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()