diff --git a/qubesappmenus/__init__.py b/qubesappmenus/__init__.py index fa85e1e..1dc694b 100644 --- a/qubesappmenus/__init__.py +++ b/qubesappmenus/__init__.py @@ -142,7 +142,10 @@ class AppmenusExtension(qubes.ext.Extension): anything_changed = True templates_dir = self.templates_dir(vm) - appmenus = os.listdir(templates_dir) + if os.path.exists(templates_dir): + appmenus = os.listdir(templates_dir) + else: + appmenus = [] changed_appmenus = [] if os.path.exists(self.whitelist_path(vm)): whitelist = [x.rstrip() for x in open(self.whitelist_path(vm))]