replace <INS> in cfgdirs if possible

This commit is contained in:
2026-08-26 16:14:25 +02:00
parent 480bf8eb28
commit edef5424bd
+6 -1
View File
@@ -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('<INS>', instrument)
self.cfgdirs = superconfig.get('cfgdirs')
if self.cfgdirs:
if instrument:
self.cfgdirs = self.cfgdirs.replace('<INS>', instrument)
elif len(self.instruments) == 1:
self.cfgdirs = self.cfgdirs.replace('<INS>', list(self.instruments)[0])
if self.ins_config:
frappy_ports = self.ins_config.get('frappy_ports', '0')
ports = frappy_ports.split('-')