diff options
author | Ansuel Smith <ansuelsmth@gmail.com> | 2021-07-06 00:59:40 +0200 |
---|---|---|
committer | Paul Spooren <mail@aparcar.org> | 2021-07-05 14:15:58 -1000 |
commit | 64ce35bfafb14a0d0e86990037be5c437babead0 (patch) | |
tree | 9e11c4d429051b95579d7d52334a2aefedfd4192 | |
parent | e4cfefa9fc3d22da5705b554785ba9c533c373d0 (diff) | |
download | upstream-64ce35bfafb14a0d0e86990037be5c437babead0.tar.gz upstream-64ce35bfafb14a0d0e86990037be5c437babead0.tar.bz2 upstream-64ce35bfafb14a0d0e86990037be5c437babead0.zip |
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@gmail.com>
-rwxr-xr-x | scripts/dl_cleanup.py | 5 |
1 files changed, 5 insertions, 0 deletions
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() |