From e3f0da6193a0128c7e3d265058d551c281e50c03 Mon Sep 17 00:00:00 2001 From: XxKingsxX-Pinu <58925163+rai68@users.noreply.github.com> Date: Tue, 9 Jul 2024 04:57:52 +1000 Subject: [PATCH] small fixes --- pwnagotchi/fs/__init__.py | 6 ++++-- pwnagotchi/log.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pwnagotchi/fs/__init__.py b/pwnagotchi/fs/__init__.py index d8a56e0a..f0df1f6a 100644 --- a/pwnagotchi/fs/__init__.py +++ b/pwnagotchi/fs/__init__.py @@ -3,7 +3,8 @@ import re import tempfile import contextlib import shutil -import _thread +#import _thread +import threading import logging from time import sleep @@ -85,7 +86,8 @@ def setup_mounts(config): if interval: logging.debug("[FS] Starting thread to sync %s (interval: %d)", options['mount'], interval) - _thread.start_new_thread(m.daemonize, (interval,)) + threading.Thread(target=m.daemonize, args=(interval,),name="File Sys").start() + #_thread.start_new_thread(m.daemonize, (interval,)) else: logging.debug("[FS] Not syncing %s, because interval is 0", options['mount']) diff --git a/pwnagotchi/log.py b/pwnagotchi/log.py index 7b56a2c4..cca7bc52 100644 --- a/pwnagotchi/log.py +++ b/pwnagotchi/log.py @@ -217,7 +217,7 @@ class LastSession(object): def setup_logging(args, config): cfg = config['main']['log'] filename = cfg['path'] - filenameDebug = cfg['path'] + filenameDebug = cfg['path-debug'] #global formatter formatter = logging.Formatter("[%(asctime)s] [%(levelname)s] [%(threadName)s] : %(message)s")