erroneous config files should be accepted in command line
frappyman.is_cfg(config) should not try to run the cfg file
This commit is contained in:
10
frappyman.py
10
frappyman.py
@ -227,11 +227,11 @@ class FrappyManager(ServiceManager):
|
|||||||
raise FileNotFoundError(f'{cfg} not found')
|
raise FileNotFoundError(f'{cfg} not found')
|
||||||
|
|
||||||
def is_cfg(self, ins, service, cfg):
|
def is_cfg(self, ins, service, cfg):
|
||||||
try:
|
for cfgdir in self.config_dirs(ins, service):
|
||||||
self.cfg_details(ins, service, cfg)
|
cfgfile = join(cfgdir, f'{cfg}_cfg.py')
|
||||||
return True
|
if exists(cfgfile):
|
||||||
except Exception:
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def all_cfg(self, ins, service, details=False):
|
def all_cfg(self, ins, service, details=False):
|
||||||
"""get available cfg files
|
"""get available cfg files
|
||||||
|
Reference in New Issue
Block a user