Skip to content

Commit 7ba6a96

Browse files
dev
1 parent 5d7adf7 commit 7ba6a96

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

moler/command_scheduler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ def enqueue_starting_on_connection(connection_observer):
4343
)
4444
t1.daemon = True
4545
t1.start()
46-
connection_observer.logger.warning(f"Requested to execute command ({connection_observer}) but the other command is running. Waiting for a free slot.")
46+
connection_observer._log(logging.WARNING, f"Requested to execute command ({connection_observer}) but the other "
47+
"command is running. Waiting for a free slot.")
4748

4849
@staticmethod
4950
def dequeue_running_on_connection(connection_observer):

moler/connection_observer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""Base class for all events and commands that are to be observed on connection."""
44

55
__author__ = "Grzegorz Latuszek, Marcin Usielski, Michal Ernst"
6-
__copyright__ = "Copyright (C) 2018-2024 Nokia"
6+
__copyright__ = "Copyright (C) 2018-2025 Nokia"
77
__email__ = (
88
99
)
@@ -546,7 +546,7 @@ def get_short_desc(self) -> str:
546546
"""
547547
return f"Observer '{self.__class__.__module__}.{self}'"
548548

549-
def _log(self, lvl: int, msg: str, extra: dict = None, levels_to_go_up: int = 1) -> None:
549+
def _log(self, lvl: int, msg: str, extra: Optional[dict] = None, levels_to_go_up: int = 1) -> None:
550550
"""
551551
Log a message with the specified level.
552552

0 commit comments

Comments
 (0)