From e696a0a90a86363ecde28eb6eef6a71b426484d3 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 25 Mar 2019 09:49:21 +0100 Subject: [PATCH] Rename to _logging the logging module to prevent typos --- royalnet/bots/telegram.py | 5 +++++ royalnet/network/royalnetlink.py | 4 ++-- royalnet/network/royalnetserver.py | 6 +++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/royalnet/bots/telegram.py b/royalnet/bots/telegram.py index b56e23be..5f7a070b 100644 --- a/royalnet/bots/telegram.py +++ b/royalnet/bots/telegram.py @@ -1,11 +1,16 @@ import telegram import asyncio import typing +import logging as _logging from ..commands import NullCommand from ..utils import asyncify, Call, Command from ..network import RoyalnetLink, Message +loop = asyncio.get_event_loop() +log = _logging.getLogger(__name__) + + async def todo(message: Message): pass diff --git a/royalnet/network/royalnetlink.py b/royalnet/network/royalnetlink.py index 557cb1e2..73778528 100644 --- a/royalnet/network/royalnetlink.py +++ b/royalnet/network/royalnetlink.py @@ -4,12 +4,12 @@ import uuid import functools import typing import pickle -import logging +import logging as _logging from .messages import Message, ErrorMessage from .packages import Package loop = asyncio.get_event_loop() -log = logging.getLogger(__name__) +log = _logging.getLogger(__name__) class NotConnectedError(Exception): diff --git a/royalnet/network/royalnetserver.py b/royalnet/network/royalnetserver.py index 208d805e..c0e4009b 100644 --- a/royalnet/network/royalnetserver.py +++ b/royalnet/network/royalnetserver.py @@ -5,12 +5,12 @@ import datetime import pickle import uuid import asyncio -import logging -from .messages import Message, ErrorMessage, InvalidPackageEM, InvalidSecretEM, IdentifySuccessfulMessage +import logging as _logging +from .messages import InvalidPackageEM, InvalidSecretEM, IdentifySuccessfulMessage from .packages import Package loop = asyncio.get_event_loop() -log = logging.getLogger(__name__) +log = _logging.getLogger(__name__) class ConnectedClient: