xmlrpc: fix bug in setting XMLRPCServer.single_use
PATCH 1/1 xmlrpc: fix bug in setting XMLRPCServer.single_use
XMLRPCServer.single_use attribute was always set to False. This caused xmlrpc server to keep running after build is done as BitBakeServerCommands.removeClient only shuts down server if its single_use attribute is set to True.
--- bitbake/lib/bb/server/xmlrpc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
bitbake/lib/bb/server/xmlrpc.py +2 -1
@@ -193,6 +193,8 @@ class XMLRPCServer(SimpleXMLRPCServer, BaseImplServer): BaseImplServer.__init__(self) if (interface[1] == 0): # anonymous port, not getting reused self.single_use = True + else: + self.singe_use = False # Use auto port configuration if (interface[1] == -1): interface = (interface[0], 0)
@@ -205,7 +207,6 @@ class XMLRPCServer(SimpleXMLRPCServer, BaseImplServer): self.commands = BitBakeServerCommands(self) self.autoregister_all_functions(self.commands, "") self.interface = interface - self.single_use = False def addcooker(self, cooker): BaseImplServer.addcooker(self, cooker)
Signature · 1 line
2.1.4
Quoted 16 lines · Ed Bartosh
XMLRPCServer.single_use attribute was always set to False. This caused xmlrpc server to keep running after build is done as BitBakeServerCommands.removeClient only shuts down server if its
single_useattribute is set to True.Signed-off-by Ed Bartosh <[email protected]>---
bitbake/lib/bb/server/xmlrpc.py | 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)bitbake/lib/bb/server/xmlrpc.py +0
-0@@ -193,6 +193,8 @@ class XMLRPCServer(SimpleXMLRPCServer,
Quoted 7 lines
BaseImplServer):
BaseImplServer.__init__(self)
if (interface[1] == 0): # anonymous port, not getting reused
self.single_use = True
+ else:
+ self.singe_use = False
This won't work, right? Typo.
Regards,
Joshua
Quoted 15 lines
# Use auto port configuration
if (interface[1] == -1):
interface = (interface[0], 0)bitbake/lib/bb/server/xmlrpc.py +0
-0@@ -205,7 +207,6 @@ class XMLRPCServer(SimpleXMLRPCServer,BaseImplServer):
self.commands = BitBakeServerCommands(self)self.autoregister_all_functions(self.commands, "")self.interface = interface
- self.single_use = False
defaddcooker(self, cooker):
BaseImplServer.addcooker(self, cooker)
--
2.1.4
Quoted 35 lines
-----Original Message-----
From: [email protected] [mailto:bitbake- [email protected]] On Behalf Of Joshua G Lock
Sent: den 4 mars 2016 11:30
To: [email protected]
Subject: Re: [bitbake-devel] [PATCH] xmlrpc: fix bug in setting XMLRPCServer.single_useQuoted 16 lines · Ed Bartosh
XMLRPCServer.single_use attribute was always set to False. This caused xmlrpc server to keep running after build is done as BitBakeServerCommands.removeClient only shuts down server if its
single_useattribute is set to True.Signed-off-by Ed Bartosh <[email protected]>---
bitbake/lib/bb/server/xmlrpc.py | 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)bitbake/lib/bb/server/xmlrpc.py +0
-0@@ -193,6 +193,8 @@ class XMLRPCServer(SimpleXMLRPCServer,Quoted 7 lines
BaseImplServer):
BaseImplServer.__init__(self)
if (interface[1] == 0): # anonymous port, not getting reused
self.single_use = True
+ else:
+ self.singe_use = FalseThis won't work, right? Typo.
Quoted 3 lines
Regards,
Joshua
Or you can simplify it as:
self.single_use = interface[1] == 0
//Peter
Quoted 35 lines · Peter Kjellerstedt
Quoted 35 lines
-----Original Message-----
From: [email protected] [mailto:bitbake- [email protected]] On Behalf Of Joshua G Lock
Sent: den 4 mars 2016 11:30
To: [email protected]
Subject: Re: [bitbake-devel] [PATCH] xmlrpc: fix bug in setting XMLRPCServer.single_useQuoted 16 lines · Ed Bartosh
XMLRPCServer.single_use attribute was always set to False. This caused xmlrpc server to keep running after build is done as BitBakeServerCommands.removeClient only shuts down server if its
single_useattribute is set to True.Signed-off-by Ed Bartosh <[email protected]>---
bitbake/lib/bb/server/xmlrpc.py | 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)bitbake/lib/bb/server/xmlrpc.py +0
-0@@ -193,6 +193,8 @@ class XMLRPCServer(SimpleXMLRPCServer,Quoted 7 lines
BaseImplServer):
BaseImplServer.__init__(self)
if (interface[1] == 0): # anonymous port, not getting reused
self.single_use = True
+ else:
+ self.singe_use = FalseThis won't work, right? Typo.
Quoted 7 lines
Quoted 3 lines
Regards,
Joshua
Or you can simplify it as:
self.single_use = interface[1] == 0
I thought about doing this. Decided not to do as it's less readable from my point of view.
--
Regards,
Ed
Quoted 38 lines · Ed Bartosh
Quoted 37 lines · Peter Kjellerstedt
Quoted 37 lines
-----Original Message-----
From: [email protected] [mailto:bitbake- [email protected]] On Behalf Of Joshua G Lock
Sent: den 4 mars 2016 11:30
To: [email protected]
Subject: Re: [bitbake-devel] [PATCH] xmlrpc: fix bug in setting XMLRPCServer.single_useQuoted 21 lines · Ed Bartosh
XMLRPCServer.single_use attribute was always set to False. This caused xmlrpc server to keep running after build is done as BitBakeServerCommands.removeClient only shuts down server if its
single_useattribute is set to True.Signed-off-by Ed Bartosh <[email protected]>--- bitbake/lib/bb/server/xmlrpc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)bitbake/lib/bb/server/xmlrpc.py +0
-0@@ -193,6 +193,8 @@ class XMLRPCServer(SimpleXMLRPCServer,BaseImplServer):
BaseImplServer.__init__(self) if (interface[1] == 0): # anonymous port, not gettingreused
self.single_use = Truebitbake/lib/bb/server/xmlrpc.py class XMLRPCServer(SimpleXMLRPCServer, BaseImplServer): · line 197
Quoted 2 lines
bitbake/lib/bb/server/xmlrpc.py +2
-0+ else: + self.singe_use = FalseThis won't work, right? Typo.
Regards,
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Joshua
Or you can simplify it as:
self.single_use = interface[1] == 0I thought about doing this. Decided not to do as it's less readable from my point of view.
The pythonic way would be
self.single_use = True if (interface == 0) else False
Quoted 4 lines
--
Regards,
Ed
Quoted 11 lines · Joshua G Lock
Quoted 10 lines · Ed Bartosh
XMLRPCServer.single_use attribute was always set to False. This caused xmlrpc server to keep running after build is done as BitBakeServerCommands.removeClient only shuts down server if its
single_useattribute is set to True.Signed-off-by Ed Bartosh <[email protected]>---
bitbake/lib/bb/server/xmlrpc.py | 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 16 lines
Quoted 6 lines
bitbake/lib/bb/server/xmlrpc.py +0
-0@@ -193,6 +193,8 @@ class XMLRPCServer(SimpleXMLRPCServer,Quoted 7 lines
BaseImplServer):
BaseImplServer.__init__(self)
if (interface[1] == 0): # anonymous port, not getting reused
self.single_use = True
+ else:
+ self.singe_use = FalseThis won't work, right? Typo.
Why do you think so? It works for me so far :)
--
Regards,
Ed
Quoted 30 lines · Ed Bartosh
Quoted 13 lines · Joshua G Lock
Quoted 11 lines · Ed Bartosh
XMLRPCServer.single_use attribute was always set to False. This caused xmlrpc server to keep running after build is done as BitBakeServerCommands.removeClient only shuts down server if its
single_useattribute is set to True.Signed-off-by Ed Bartosh <[email protected]>---
bitbake/lib/bb/server/xmlrpc.py | 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)Quoted 16 lines
Quoted 6 lines
bitbake/lib/bb/server/xmlrpc.py +0
-0@@ -193,6 +193,8 @@ class XMLRPCServer(SimpleXMLRPCServer,Quoted 8 lines
BaseImplServer):
BaseImplServer.__init__(self)
if (interface[1] == 0): # anonymous port, not getting
reused
self.single_use = True
+ else:
+ self.singe_use = FalseThis won't work, right? Typo.
Quoted 1 line
Why do you think so? It works for me so far :)
I don't know toaster's code and only have the context from this diff, however it looks like you've removed a line that sets a single_use variable and added a line that sets a singe_use variable. These are different variables (looks like the result of a typo) thus I wouldn't expect it to work, or at least I wouldn't expect the addition of this line to have affected things.
(Just to be sure I used git grep on the bitbake repository and didn't find any instances of singe_use).
Regards,
Joshua
Quoted 28 lines · Ed Bartosh
Quoted 11 lines · Joshua G Lock
Quoted 10 lines · Ed Bartosh
XMLRPCServer.single_use attribute was always set to False. This caused xmlrpc server to keep running after build is done as BitBakeServerCommands.removeClient only shuts down server if its
single_useattribute is set to True.Signed-off-by Ed Bartosh <[email protected]>---
bitbake/lib/bb/server/xmlrpc.py | 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)Quoted 16 lines
Quoted 6 lines
bitbake/lib/bb/server/xmlrpc.py +0
-0@@ -193,6 +193,8 @@ class XMLRPCServer(SimpleXMLRPCServer,Quoted 7 lines
BaseImplServer):
BaseImplServer.__init__(self)
if (interface[1] == 0): # anonymous port, not getting reused
self.single_use = True
+ else:
+ self.singe_use = FalseThis won't work, right? Typo.
Quoted 1 line
Why do you think so? It works for me so far :)
Then this change is useless, isn't it? Nothing is using singe_use variable (with missing "l").
Quoted 9 lines
--
Regards,
EdSignature · 4 lines
_______________________________________________ bitbake-devel mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/bitbake-devel
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]