From 5c6ec7ff868c4157ee23033198df3734ab02ae36 Mon Sep 17 00:00:00 2001 From: Raylan Date: Thu, 23 Jan 2025 14:58:47 -0300 Subject: [PATCH] PEP-8 compliance --- sshuttle/namespace.py | 8 ++++---- tests/client/test_options.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sshuttle/namespace.py b/sshuttle/namespace.py index 43105c6..f168b74 100644 --- a/sshuttle/namespace.py +++ b/sshuttle/namespace.py @@ -14,13 +14,13 @@ def enter_namespace(namespace, namespace_pid): namespace_dir = f'{NETNS_RUN_DIR}/{namespace}' else: namespace_dir = f'/proc/{namespace_pid}/ns/net' - + if not os.path.exists(namespace_dir): raise Fatal('The namespace %r does not exists.' % namespace_dir) debug2('loading libc') libc = ctypes.CDLL(ctypes.util.find_library("c"), use_errno=True) - + default_errcheck = libc.setns.errcheck def errcheck(ret, *args): @@ -29,8 +29,8 @@ def enter_namespace(namespace, namespace_pid): raise Fatal(e, os.strerror(e)) if default_errcheck: return default_errcheck(ret, *args) - - libc.setns.errcheck = errcheck # type: ignore + + libc.setns.errcheck = errcheck # type: ignore debug1('Entering namespace %r' % namespace_dir) diff --git a/tests/client/test_options.py b/tests/client/test_options.py index c43f68b..0bb6d79 100644 --- a/tests/client/test_options.py +++ b/tests/client/test_options.py @@ -189,7 +189,7 @@ def test_parse_namespace(): '@my.long_namespace.with.multiple.dots', 'my.Namespace.With.Mixed.Case', ] - + for namespace in valid_namespaces: assert sshuttle.options.parse_namespace(namespace) == namespace