From 64ce35bfafb14a0d0e86990037be5c437babead0 Mon Sep 17 00:00:00 2001 From: Ansuel Smith Date: Tue, 6 Jul 2021 00:59:40 +0200 Subject: [PATCH] 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 --- scripts/dl_cleanup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/dl_cleanup.py b/scripts/dl_cleanup.py index d086761dc7..1acb049582 100755 --- a/scripts/dl_cleanup.py +++ b/scripts/dl_cleanup.py @@ -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()