scripts: check if dl directory exist in dl_cleanup script
[openwrt/staging/thess.git] / scripts / dl_cleanup.py
index d086761dc71a3b5dfd30140071673f9f3cde411b..1acb0495827b5ff05c4a982a528dc7aa5bd6a59e 100755 (executable)
@@ -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()