diff mbox series

[1/2] server/xmlrpcserver: fix some warnings

Message ID 20241204173011.1415479-1-chris.laplante@agilent.com
State Accepted, archived
Commit 0622b3df9a55ed66009f3bed47fbf52bb2122056
Headers show
Series [1/2] server/xmlrpcserver: fix some warnings | expand

Commit Message

chris.laplante@agilent.com Dec. 4, 2024, 5:30 p.m. UTC
From: Chris Laplante <chris.laplante@agilent.com>

+ Unnecessary parens
+ Missing imports
+ Instance attribute defined outside of __init__

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
---
 lib/bb/server/xmlrpcserver.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/lib/bb/server/xmlrpcserver.py b/lib/bb/server/xmlrpcserver.py
index 04b0b17db..fd4245a51 100644
--- a/lib/bb/server/xmlrpcserver.py
+++ b/lib/bb/server/xmlrpcserver.py
@@ -14,6 +14,8 @@  from xmlrpc.server import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler
 import bb.server.xmlrpcclient
 
 import bb
+import bb.cooker
+import bb.event
 
 # This request handler checks if the request has a "Bitbake-token" header
 # field (this comes from the client side) and compares it with its internal
@@ -54,7 +56,7 @@  class BitBakeXMLRPCServer(SimpleXMLRPCServer):
 
     def __init__(self, interface, cooker, parent):
         # Use auto port configuration
-        if (interface[1] == -1):
+        if interface[1] == -1:
             interface = (interface[0], 0)
         SimpleXMLRPCServer.__init__(self, interface,
                                     requestHandler=BitBakeXMLRPCRequestHandler,
@@ -87,11 +89,12 @@  class BitBakeXMLRPCServer(SimpleXMLRPCServer):
     def handle_requests(self):
         self._handle_request_noblock()
 
-class BitBakeXMLRPCServerCommands():
+class BitBakeXMLRPCServerCommands:
 
     def __init__(self, server):
         self.server = server
         self.has_client = False
+        self.event_handle = None
 
     def registerEventHandler(self, host, port):
         """