From 27fecd30b8dc7969e9cd10d9f09b62b5eda374c9 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 22 Apr 2024 08:05:29 +0200 Subject: [PATCH] host_access: error if the path does not exist --- bubblebox.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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): -- 2.30.2