Edited to make AI work

Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-07-24 19:47:15 +02:00
parent 702d32292f
commit 27da741005
3 changed files with 5 additions and 6 deletions

View File

@ -6,7 +6,6 @@ import importlib, importlib.util
import logging
default_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "default")
loaded = {}
database = {}
@ -44,7 +43,7 @@ def toggle_plugin(name, enable=True):
global loaded, database
if pwnagotchi.config:
if not name in pwnagotchi.config['main']['plugins']:
if name not 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')