Skip to content
Snippets Groups Projects
Commit e04949bd authored by Štěpán Balážik's avatar Štěpán Balážik
Browse files

pylint: various fixes

parent 3fc18357
No related branches found
No related tags found
1 merge request!175ci: make pylint work again with the new Docker image
Pipeline #63029 passed
......@@ -114,7 +114,7 @@ class LinuxNamespace:
with keep_directory():
for n in self.next:
if libc.setns(n, 0) == -1:
ns = self.namespaces[self.next.index(n)] # NOQA
ns = self.namespaces[self.next.index(n)] # noqa Adopted code. pylint: disable=unused-variable
e = ctypes.get_errno()
raise OSError(e, os.strerror(e))
......
......@@ -64,9 +64,9 @@ class InterfaceManager:
if ip_address(address) in self.ip4_internal_range or \
ip_address(address) in self.ip6_internal_range:
raise ValueError(f"Address {address} in the internally reserved range.")
self._add_address(address, check_duplicate)
self._add_address(address)
def _add_address(self, address, check_duplicate=False):
def _add_address(self, address):
try:
subprocess.run(f"ip addr add {address} dev {self.interface}",
capture_output=True, check=True, shell=True)
......
......@@ -48,7 +48,7 @@ class TestServer:
if active:
self.stop()
def start(self, port=53):
def start(self):
""" Synchronous start """
with self.active_lock:
if self.active:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment