From: Ralf Jung Date: Mon, 22 Apr 2024 06:05:29 +0000 (+0200) Subject: host_access: error if the path does not exist X-Git-Url: https://git.ralfj.de/bubblebox.git/commitdiff_plain/27fecd30b8dc7969e9cd10d9f09b62b5eda374c9 host_access: error if the path does not exist --- diff --git a/bubblebox.py b/bubblebox.py index d7c6cb0..a6b9d96 100644 --- a/bubblebox.py +++ b/bubblebox.py @@ -144,7 +144,10 @@ def host_access(dirs): path = path.replace("//", "/") path = path.removesuffix("/.") # glob expansion - yield from glob.glob(path) + globbed = glob.glob(path) + if len(globbed) == 0: + raise Exception(f"Path does not exist: {path}") + yield from globbed def recursive_host_access(root, dirs, out): for names, desc in dirs.items(): for path in expand(root, names):