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>
Signed-off-by: maurerr <mariusd84@gmail.com>
This commit is contained in:
Ansuel Smith 2021-07-06 00:59:40 +02:00 committed by maurerr
parent 1225aacb94
commit 619578062f

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