klippy: Introduce load_config_prefix() for modules that take parameters
Use both load_config() and load_config_prefix() functions when dynamically loading a module from the extras directory - if the config section name has parameters in it then use load_config_prefix(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -218,6 +218,4 @@ class Replicape:
|
||||
return pclass(self, channel, pin_params)
|
||||
|
||||
def load_config(config):
|
||||
if config.get_name() != 'replicape':
|
||||
raise config.error("Invalid replicape config name")
|
||||
return Replicape(config)
|
||||
|
||||
Reference in New Issue
Block a user