[elbe-devel] [PATCH 1/2] elbepack: soapclient: remove retries instance attribute

Thomas Weißschuh thomas.weissschuh at linutronix.de
Tue Jul 2 08:37:40 CEST 2024


This is a function-local variable that has no reason to be exposed as a
instance attribute.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/soapclient.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/elbepack/soapclient.py b/elbepack/soapclient.py
index e1cef54d5fcb..e8bc7339f079 100644
--- a/elbepack/soapclient.py
+++ b/elbepack/soapclient.py
@@ -60,23 +60,23 @@ class ElbeSoapClient:
         # Attributes
         self.wsdl = 'http://' + host + ':' + str(port) + '/soap/?wsdl'
         self.control = None
-        self.retries = 0
+        current_retries = 0
 
         # Loop and try to connect
         while self.control is None:
-            self.retries += 1
+            current_retries += 1
             try:
                 self.control = Client(self.wsdl, timeout=cfg['soaptimeout'])
             except URLError as e:
-                if self.retries > retries:
+                if current_retries > retries:
                     raise e
                 time.sleep(1)
             except socket.error as e:
-                if self.retries > retries:
+                if current_retries > retries:
                     raise e
                 time.sleep(1)
             except BadStatusLine as e:
-                if self.retries > retries:
+                if current_retries > retries:
                     raise e
                 time.sleep(1)
 

-- 
2.45.2



More information about the elbe-devel mailing list