Skip to content

Commit

Permalink
Merge branch 'hhell/refactor' into 'master'
Browse files Browse the repository at this point in the history
refactor(all): rename module-level logger to LOGGER

See merge request utilities/ntc!22
  • Loading branch information
Artem Vasenin committed Sep 15, 2021
2 parents ecc4a10 + 51745da commit c78f2a6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ntc/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from .leaf import CfgLeaf

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


class CfgNode(UserDict):
Expand Down Expand Up @@ -403,7 +403,7 @@ def _update_module(self, full_key: str, value) -> None:
lines.append(f"{full_key} = {value.create_eval_str(cls_name, args, kwargs)}\n")
else:
message = f"Config was modified with unsavable value: {value!r}"
logger.warning(message)
LOGGER.warning(message)
lines.append(f"# {message}")
self._safe_save = False
self._module.extend(lines)
Expand Down
3 changes: 0 additions & 3 deletions ntc/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import importlib.util
import logging
import sys
from pathlib import Path
from types import ModuleType
Expand All @@ -9,8 +8,6 @@

from .errors import ModuleError

logger = logging.getLogger(__name__)


def import_module(module_path: Path) -> ModuleType:
package = _load_package(module_path.parent)
Expand Down

0 comments on commit c78f2a6

Please sign in to comment.