Skip to contentSkip to conversation

bitbake: BBUIHelper: Remove function findServerDetails

PATCH In review Sujith H 2 participants 2 messages Jan 5, 2016 – Jan 27, 2016

lore
Share & tools
lore

Sujith H

author
#0 lore raw

PATCH 1/1 bitbake: BBUIHelper: Remove function findServerDetails

findServerDetails function can be removed safely
from the source tree. Couldn't find any files
calling this function.

---
 lib/bb/ui/uihelper.py | 41 -----------------------------------------
 1 file changed, 41 deletions(-)
lib/bb/ui/uihelper.py +0 -41
index a703387..db70b76 100644
@@ -57,44 +57,3 @@ class BBUIHelper:
         self.needUpdate = False
         return (self.running_tasks, self.failed_tasks)
 
-    def findServerDetails(self):
-        import sys
-        import optparse
-        from bb.server.xmlrpc import BitbakeServerInfo, BitBakeServerConnection
-        host = ""
-        port = 0
-        bind = ""
-        parser = optparse.OptionParser(
-            usage = """%prog -H host -P port -B bindaddr""")
-
-        parser.add_option("-H", "--host", help = "Bitbake server's IP address",
-                   action = "store", dest = "host", default = None)
-
-        parser.add_option("-P", "--port", help = "Bitbake server's Port number",
-                   action = "store", dest = "port", default = None)
-
-        parser.add_option("-B", "--bind", help = "Hob2 local bind address",
-                   action = "store", dest = "bind", default = None)
-
-        options, args = parser.parse_args(sys.argv)
-        for key, val in options.__dict__.items():
-            if key == 'host' and val:
-                host = val
-            elif key == 'port' and val:
-                port = int(val)
-            elif key == 'bind' and val:
-                bind = val
-
-        if not host or not port or not bind:
-            parser.print_usage()
-            sys.exit(1)
-
-        serverinfo = BitbakeServerInfo(host, port)
-        clientinfo = (bind, 0)
-        connection = BitBakeServerConnection(serverinfo, clientinfo)
-
-        server = connection.connection
-        eventHandler = connection.events
-
-        return server, eventHandler, host, bind
-
Signature · 1 line
2.4.3
Acked-by on v1 1/1
#1 lore raw
Quoted 47 lines · On Tue, 05 Jan 2016 18:30:15 Sujith H wrote:

findServerDetails function can be removed safely
from the source tree. Couldn't find any files
calling this function.

---
 lib/bb/ui/uihelper.py | 41 -----------------------------------------
 1 file changed, 41 deletions(-)
lib/bb/ui/uihelper.py +0 -4
index a703387..db70b76 100644
@@ -57,44 +57,3 @@ class BBUIHelper:
         self.needUpdate = False
         return (self.running_tasks, self.failed_tasks)
 
-    def findServerDetails(self):
-        import sys
-        import optparse
-        from bb.server.xmlrpc import BitbakeServerInfo,

BitBakeServerConnection - host = ""

lib/bb/ui/uihelper.py +0 -6
-        port = 0
-        bind = ""
-        parser = optparse.OptionParser(
-            usage = """%prog -H host -P port -B bindaddr""")
-
-        parser.add_option("-H", "--host", help = "Bitbake server's IP

address", - action = "store", dest = "host", default =
None) -
- parser.add_option("-P", "--port", help = "Bitbake server's Port
number", - action = "store", dest = "port", default =
None) -

lib/bb/ui/uihelper.py +0 -14
-        parser.add_option("-B", "--bind", help = "Hob2 local bind address",
-                   action = "store", dest = "bind", default = None) -
-        options, args = parser.parse_args(sys.argv)
-        for key, val in options.__dict__.items():
-            if key == 'host' and val:
-                host = val
-            elif key == 'port' and val:
-                port = int(val)
-            elif key == 'bind' and val:
-                bind = val
-
-        if not host or not port or not bind:
-            parser.print_usage()
-            sys.exit(1)

lib/bb/ui/uihelper.py class BBUIHelper: · line 100

Quoted 10 lines
lib/bb/ui/uihelper.py +0 -10
-
-        serverinfo = BitbakeServerInfo(host, port)
-        clientinfo = (bind, 0)
-        connection = BitBakeServerConnection(serverinfo, clientinfo)
-
-        server = connection.connection
-        eventHandler = connection.events
-
-        return server, eventHandler, host, bind
-

Looks like this was left over from the early days of Hob.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre