From af4947d02032981b2842e71b2e7cb75cc8d0b48c Mon Sep 17 00:00:00 2001 From: shukari Date: Wed, 6 Aug 2025 19:54:08 +0200 Subject: [PATCH] move logger init to the end of the import block --- meshtastic/__main__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index 11e88be..3025bde 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -9,9 +9,6 @@ from typing import List, Optional, Union from types import ModuleType import argparse -import logging - -logger = logging.getLogger(__name__) argcomplete: Union[None, ModuleType] = None try: @@ -66,6 +63,8 @@ except ImportError as e: from meshtastic.protobuf import channel_pb2, config_pb2, portnums_pb2 from meshtastic.version import get_active_version +logger = logging.getLogger(__name__) + def onReceive(packet, interface) -> None: """Callback invoked when a packet arrives""" args = mt_config.args