From 619578062fec1372b76ae792c7128bd1519020e8 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 Signed-off-by: maurerr --- scripts/dl_cleanup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/dl_cleanup.py b/scripts/dl_cleanup.py index d086761dc71..1acb0495827 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()