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:
parent
e4cfefa9fc
commit
64ce35bfaf
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue