mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
@ -35,8 +35,6 @@ if __name__ == '__main__':
|
|||||||
config = utils.load_config(args)
|
config = utils.load_config(args)
|
||||||
utils.setup_logging(args, config)
|
utils.setup_logging(args, config)
|
||||||
|
|
||||||
logging.debug("effective configuration:\n\n%s\n\n" % yaml.dump(config, default_flow_style=False))
|
|
||||||
|
|
||||||
pwnagotchi.set_name(config['main']['name'])
|
pwnagotchi.set_name(config['main']['name'])
|
||||||
|
|
||||||
plugins.load(config)
|
plugins.load(config)
|
||||||
@ -47,6 +45,8 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
logging.info("%s@%s (v%s)" % (pwnagotchi.name(), agent.fingerprint(), pwnagotchi.version))
|
logging.info("%s@%s (v%s)" % (pwnagotchi.name(), agent.fingerprint(), pwnagotchi.version))
|
||||||
|
|
||||||
|
logging.debug("effective configuration:\n\n%s\n\n" % yaml.dump(config, default_flow_style=False))
|
||||||
|
|
||||||
for _, plugin in plugins.loaded.items():
|
for _, plugin in plugins.loaded.items():
|
||||||
logging.debug("plugin '%s' v%s loaded from %s" % (plugin.__name__, plugin.__version__, plugin.__file__))
|
logging.debug("plugin '%s' v%s loaded from %s" % (plugin.__name__, plugin.__version__, plugin.__file__))
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ def load(config, agent, epoch, from_disk=True):
|
|||||||
|
|
||||||
start = time.time()
|
start = time.time()
|
||||||
a2c = A2C(MlpLstmPolicy, env, **config['params'])
|
a2c = A2C(MlpLstmPolicy, env, **config['params'])
|
||||||
logging.debug("[ai] A2C crated in %.2fs" % (time.time() - start))
|
logging.debug("[ai] A2C created in %.2fs" % (time.time() - start))
|
||||||
|
|
||||||
if from_disk and os.path.exists(config['path']):
|
if from_disk and os.path.exists(config['path']):
|
||||||
logging.info("[ai] loading %s ..." % config['path'])
|
logging.info("[ai] loading %s ..." % config['path'])
|
||||||
|
Reference in New Issue
Block a user