Skip to content

Commit

Permalink
Merge pull request #17157 from LabNConsulting/liambrady/topotest-mask…
Browse files Browse the repository at this point in the history
…ed-logging

tests: logger masked in topotest.py
  • Loading branch information
ton31337 authored Oct 20, 2024
2 parents fa291dd + 1b38f33 commit 5d5da52
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/topotests/lib/topotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1244,8 +1244,8 @@ def _sysctl_assure(commander, variable, value):
def sysctl_atleast(commander, variable, min_value, raises=False):
try:
if commander is None:
logger = logging.getLogger("topotest")
commander = micronet.Commander("sysctl", logger=logger)
topotest_logger = logging.getLogger("topotest")
commander = micronet.Commander("sysctl", logger=topotest_logger)

return _sysctl_atleast(commander, variable, min_value)
except subprocess.CalledProcessError as error:
Expand All @@ -1262,8 +1262,8 @@ def sysctl_atleast(commander, variable, min_value, raises=False):
def sysctl_assure(commander, variable, value, raises=False):
try:
if commander is None:
logger = logging.getLogger("topotest")
commander = micronet.Commander("sysctl", logger=logger)
topotest_logger = logging.getLogger("topotest")
commander = micronet.Commander("sysctl", logger=topotest_logger)
return _sysctl_assure(commander, variable, value)
except subprocess.CalledProcessError as error:
logger.warning(
Expand Down

0 comments on commit 5d5da52

Please sign in to comment.