Revert "Version 2.3.4"

This reverts commit ced919ca93.
This commit is contained in:
Jeroen Oudshoorn
2023-09-08 20:26:22 +02:00
parent f12b9ebcf8
commit 39239ee450
5 changed files with 20 additions and 26 deletions

View File

@ -42,7 +42,7 @@ def toggle_plugin(name, enable=True):
global loaded, database
if pwnagotchi.config:
if name not in pwnagotchi.config['main']['plugins']:
if not name in pwnagotchi.config['main']['plugins']:
pwnagotchi.config['main']['plugins'][name] = dict()
pwnagotchi.config['main']['plugins'][name]['enabled'] = enable
save_config(pwnagotchi.config, '/etc/pwnagotchi/config.toml')
@ -100,7 +100,6 @@ def one(plugin_name, event_name, *args, **kwargs):
logging.error(e, exc_info=True)
def load_from_file(filename):
logging.debug("loading %s" % filename)
plugin_name = os.path.basename(filename.replace(".py", ""))
@ -109,7 +108,6 @@ def load_from_file(filename):
spec.loader.exec_module(instance)
return plugin_name, instance
def load_from_path(path, enabled=()):
global loaded, database
logging.debug("loading plugins from %s - enabled: %s" % (path, enabled))