• Bug#1083123: Quick fix

    From Chris Talbot@1:229/2 to All on Thu Oct 3 04:30:01 2024
    XPost: linux.debian.bugs.dist
    From: [email protected]

    Hello,

    It looks like print_color is used in only one place, and the following
    diff should get rid of the dependency:
    ```
    diff --git a/meshtastic/mesh_interface.py
    b/meshtastic/mesh_interface.py
    index db057a3..e8950a7 100644
    --- a/meshtastic/mesh_interface.py
    +++ b/meshtastic/mesh_interface.py
    @@ -14,7 +14,6 @@ from decimal import Decimal
    from typing import Any, Callable, Dict, List, Optional, Union

    import google.protobuf.json_format
    -import print_color # type: ignore[import-untyped]
    from pubsub import pub # type: ignore[import-untyped]
    from tabulate import tabulate

    @@ -153,17 +152,7 @@ class MeshInterface: # pylint: disable=R0902
    def _printLogLine(line, interface):
    """Print a line of log output."""
    if interface.debugOut == sys.stdout:
    - # this isn't quite correct (could cause false positives),
    but currently our formatting differs between different log
    representations
    - if "DEBUG" in line:
    - print_color.print(line, color="cyan", end=None)
    - elif "INFO" in line:
    - print_color.print(line, color="white", end=None)
    - elif "WARN" in line:
    - print_color.print(line, color="yellow", end=None)
    -