Skip to content

Commit

Permalink
:rename logger to _logger when used at module level to avoid unintend…
Browse files Browse the repository at this point in the history
…ed imports
  • Loading branch information
kwisii authored and oroulet committed Nov 30, 2023
1 parent fa3a638 commit bec2907
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions asyncua/ua/ua_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from ..common.utils import Buffer
from .uatypes import type_from_optional, type_is_list, type_is_union, type_from_list, types_or_list_from_union, type_allow_subclass

logger = logging.getLogger(__name__)
_logger = logging.getLogger(__name__)

T = TypeVar('T')

Expand Down Expand Up @@ -134,7 +134,7 @@ def pack_array(self, data):
if data is None:
return Primitives.Int32.pack(-1)
if not isinstance(data, (tuple, list)):
logger.warning('ua_binary.py > _Primitive1 > pack_array > data: %s is not a instance of "list"!', data)
_logger.warning('ua_binary.py > _Primitive1 > pack_array > data: %s is not a instance of "list"!', data)
return Primitives.Int32.pack(-1) # to prevent crashing while runtime
size_data = Primitives.Int32.pack(len(data))
return size_data + struct.pack(self._fmt.format(len(data)), *data)
Expand Down

0 comments on commit bec2907

Please sign in to comment.