From edef5424bd09131c6976cabfca2c72a4376ac472 Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Wed, 26 Aug 2026 16:14:25 +0200 Subject: [PATCH] replace in cfgdirs if possible --- frappy.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frappy.py b/frappy.py index 7ea668e..01de96c 100644 --- a/frappy.py +++ b/frappy.py @@ -48,7 +48,12 @@ class FrappyConfig(Config): self.wrapperdir = superconfig.get('wrapperdir') if not Path(self.wrapperdir).is_dir(): raise ValueError(f'{self.wrapperdir} does not exist') - self.cfgdirs = superconfig.get('cfgdirs').replace('', instrument) + self.cfgdirs = superconfig.get('cfgdirs') + if self.cfgdirs: + if instrument: + self.cfgdirs = self.cfgdirs.replace('', instrument) + elif len(self.instruments) == 1: + self.cfgdirs = self.cfgdirs.replace('', list(self.instruments)[0]) if self.ins_config: frappy_ports = self.ins_config.get('frappy_ports', '0') ports = frappy_ports.split('-')