misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
dae50bc65d
commit
683d260c74
@ -43,8 +43,12 @@ def load_from_path(path, enabled=()):
|
||||
|
||||
|
||||
def load(config):
|
||||
load_from_path(default_path, enabled=config['main']['plugins'])
|
||||
if 'custom_plugins' in config['main'] and config['main']['custom_plugins'] is not None:
|
||||
load_from_path(config['main']['custom_plugins'], enabled=config['main']['plugins'])
|
||||
enabled = config['main']['plugins']
|
||||
custom_path = config['main']['custom_plugins'] if 'custom_plugins' in config['main'] else None
|
||||
# load default plugins
|
||||
load_from_path(default_path, enabled=enabled)
|
||||
# load custom ones
|
||||
if custom_path is not None:
|
||||
load_from_path(custom_path, enabled=enabled)
|
||||
|
||||
on('loaded')
|
||||
|
Loading…
x
Reference in New Issue
Block a user