[openwrt/openwrt] scripts: check if dl directory exist in dl_cleanup script
LEDE Commits
lede-commits at lists.infradead.org
Mon Jul 5 17:16:39 PDT 2021
aparcar pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/64ce35bfafb14a0d0e86990037be5c437babead0
commit 64ce35bfafb14a0d0e86990037be5c437babead0
Author: Ansuel Smith <ansuelsmth at gmail.com>
AuthorDate: Tue Jul 6 00:59:40 2021 +0200
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 at gmail.com>
---
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()
More information about the lede-commits
mailing list