From: Ansuel Smith Date: Mon, 5 Jul 2021 22:59:40 +0000 (+0200) Subject: scripts: check if dl directory exist in dl_cleanup script X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=64ce35bfafb14a0d0e86990037be5c437babead0;p=openwrt%2Fstaging%2Fldir.git 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 --- 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()