From 8622cbe476ee19b12d6d4ea77250146d5cb8717f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 10 Dec 2023 11:25:04 +0100 Subject: Adding upstream version 2.3.1. Signed-off-by: Daniel Baumann --- staslib/avahi.py | 2 +- staslib/conf.py | 2 +- staslib/ctrl.py | 4 ++-- staslib/gutil.py | 2 +- staslib/iputil.py | 20 ++++++++++---------- staslib/meson.build | 11 +---------- staslib/service.py | 2 +- staslib/stas.py | 6 +++--- 8 files changed, 20 insertions(+), 29 deletions(-) (limited to 'staslib') diff --git a/staslib/avahi.py b/staslib/avahi.py index f91e489..cd4d1f9 100644 --- a/staslib/avahi.py +++ b/staslib/avahi.py @@ -580,7 +580,7 @@ class Avahi: # pylint: disable=too-many-instance-attributes self._check_for_duplicate_ips() - def _failure_handler( # pylint: disable=no-self-use + def _failure_handler( self, _connection, _sender_name: str, diff --git a/staslib/conf.py b/staslib/conf.py index 4497698..4dd411c 100644 --- a/staslib/conf.py +++ b/staslib/conf.py @@ -659,7 +659,7 @@ class NvmeOptions(metaclass=singleton.Singleton): 'dhchap_ctrl_secret': defs.KERNEL_VERSION >= defs.KERNEL_CTRLKEY_MIN_VERSION, } - # If some of the options are False, we need to check wether they can be + # If some of the options are False, we need to check whether they can be # read from '/dev/nvme-fabrics'. This method allows us to determine that # an older kernel actually supports a specific option because it was # backported to that kernel. diff --git a/staslib/ctrl.py b/staslib/ctrl.py index 9f415b3..e4cda6b 100644 --- a/staslib/ctrl.py +++ b/staslib/ctrl.py @@ -425,7 +425,7 @@ class Dc(Controller): @property def origin(self): - '''@brief Return how this controller came into existance. Was it + '''@brief Return how this controller came into existence. Was it "discovered" through mDNS service discovery (TP8009), was it manually "configured" in stafd.conf, or was it a "referral". ''' @@ -853,6 +853,6 @@ class Ioc(Controller): self._try_to_connect_deferred.schedule() def _should_try_to_reconnect(self): - '''@brief This is used to determine when it's time to stop trying toi connect''' + '''@brief This is used to determine when it's time to stop trying to connect''' max_connect_attempts = conf.SvcConf().connect_attempts_on_ncc if self.ncc else 0 return max_connect_attempts == 0 or self._connect_attempts < max_connect_attempts diff --git a/staslib/gutil.py b/staslib/gutil.py index 7bdc117..4cdc087 100644 --- a/staslib/gutil.py +++ b/staslib/gutil.py @@ -250,7 +250,7 @@ class _TaskRunner(GObject.Object): task.run_in_thread(in_thread_exec) return task - def communicate_finish(self, result): # pylint: disable=no-self-use + def communicate_finish(self, result): '''@brief Use this function in your callback (see @cb_function) to extract data from the result object. diff --git a/staslib/iputil.py b/staslib/iputil.py index d5e93dd..910ae65 100644 --- a/staslib/iputil.py +++ b/staslib/iputil.py @@ -42,7 +42,7 @@ def _nlmsghdr(nlmsg_type, nlmsg_flags, nlmsg_seq, nlmsg_pid, msg_len: int): __u32 nlmsg_pid; /* Sending process port ID */ }; ''' - return struct.pack('