From fda6e372383b984e1ea2ef14efdeac6d7c9ad7c4 Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Wed, 11 Dec 2024 09:03:06 +0100 Subject: [PATCH] erroneous config files should be accepted in command line frappyman.is_cfg(config) should not try to run the cfg file --- frappyman.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frappyman.py b/frappyman.py index 02b95f4..7630ce1 100644 --- a/frappyman.py +++ b/frappyman.py @@ -227,11 +227,11 @@ class FrappyManager(ServiceManager): raise FileNotFoundError(f'{cfg} not found') def is_cfg(self, ins, service, cfg): - try: - self.cfg_details(ins, service, cfg) - return True - except Exception: - return False + for cfgdir in self.config_dirs(ins, service): + cfgfile = join(cfgdir, f'{cfg}_cfg.py') + if exists(cfgfile): + return True + return False def all_cfg(self, ins, service, details=False): """get available cfg files