diff --git a/demos/python/sdk_wireless_camera_control/open_gopro/ble/adapters/bleak_wrapper.py b/demos/python/sdk_wireless_camera_control/open_gopro/ble/adapters/bleak_wrapper.py index f443cef7..fefd5158 100644 --- a/demos/python/sdk_wireless_camera_control/open_gopro/ble/adapters/bleak_wrapper.py +++ b/demos/python/sdk_wireless_camera_control/open_gopro/ble/adapters/bleak_wrapper.py @@ -3,11 +3,10 @@ """Manage a Bluetooth connection using bleak.""" -import sys -import tempfile import asyncio import logging import platform +import tempfile from pathlib import Path from typing import Any, Callable, Optional, Pattern diff --git a/demos/python/sdk_wireless_camera_control/open_gopro/logger.py b/demos/python/sdk_wireless_camera_control/open_gopro/logger.py index e9da4e52..6c863180 100644 --- a/demos/python/sdk_wireless_camera_control/open_gopro/logger.py +++ b/demos/python/sdk_wireless_camera_control/open_gopro/logger.py @@ -79,7 +79,7 @@ def __init__( ) self.file_handler.setFormatter(file_formatter) # Set to TRACE for concurrency debugging - self.file_handler.setLevel(logging.DEBUG) # type: ignore # pylint: disable=no-member + self.file_handler.setLevel(logging.DEBUG) logger.addHandler(self.file_handler) self.addLoggingHandler(self.file_handler) else: @@ -124,7 +124,7 @@ def addLoggingHandler(self, handler: logging.Handler) -> None: # Enable / disable logging in modules for module in self.modules: l = logging.getLogger(module) - l.setLevel(logging.TRACE) # type: ignore + l.setLevel(logging.TRACE) # type: ignore l.addHandler(handler) # From https://stackoverflow.com/questions/2183233/how-to-add-a-custom-loglevel-to-pythons-logging-facility/35804945#35804945 @@ -259,10 +259,10 @@ def set_logging_level(level: int) -> None: set_stream_logging_level(level) -def add_logging_handler(handler: logging.Handler, level: int) -> None: +def add_logging_handler(handler: logging.Handler) -> None: """Add a handler to all of the GoPro internal modules Args: handler (logging.Handler): handler to add """ - Logger.get_instance().addLoggingHandler(handler, level) + Logger.get_instance().addLoggingHandler(handler)