All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randy Witt <randy.e.witt@linux.intel.com>
To: ed.bartosh@linux.intel.com,
	Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Cc: "bitbake-devel@lists.openembedded.org"
	<bitbake-devel@lists.openembedded.org>
Subject: Re: [PATCH] xmlrpc: fix bug in setting XMLRPCServer.single_use
Date: Mon, 7 Mar 2016 14:38:16 -0800	[thread overview]
Message-ID: <56DE02D8.9060002@linux.intel.com> (raw)
In-Reply-To: <20160307192243.GB5834@linux.intel.com>

On 03/07/2016 11:22 AM, Ed Bartosh wrote:
> On Fri, Mar 04, 2016 at 03:20:12PM +0000, Peter Kjellerstedt wrote:
>>> -----Original Message-----
>>> From: bitbake-devel-bounces@lists.openembedded.org [mailto:bitbake-
>>> devel-bounces@lists.openembedded.org] On Behalf Of Joshua G Lock
>>> Sent: den 4 mars 2016 11:30
>>> To: bitbake-devel@lists.openembedded.org
>>> Subject: Re: [bitbake-devel] [PATCH] xmlrpc: fix bug in setting
>>> XMLRPCServer.single_use
>>>
>>> On Fri, 2016-03-04 at 10:13 +0200, Ed Bartosh wrote:
>>>> 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.
>>>>
>>>> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
>>>> ---
>>>>   bitbake/lib/bb/server/xmlrpc.py | 3 ++-
>>>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/bitbake/lib/bb/server/xmlrpc.py
>>>> b/bitbake/lib/bb/server/xmlrpc.py
>>>> index 1ceca51..d627550 100644
>>>> --- a/bitbake/lib/bb/server/xmlrpc.py
>>>> +++ b/bitbake/lib/bb/server/xmlrpc.py
>>>> @@ -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
>>>
>>> This won't work, right? Typo.
>>>
>>> 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.

The pythonic way would be

self.single_use = True if (interface == 0) else False

> --
> Regards,
> Ed
>



  reply	other threads:[~2016-03-07 22:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-04  8:13 [PATCH] xmlrpc: fix bug in setting XMLRPCServer.single_use Ed Bartosh
2016-03-04 10:30 ` Joshua G Lock
2016-03-04 15:20   ` Peter Kjellerstedt
2016-03-07 19:22     ` Ed Bartosh
2016-03-07 22:38       ` Randy Witt [this message]
2016-03-07 19:21   ` Ed Bartosh
2016-03-08  8:27     ` Joshua G Lock
2016-03-08 12:36     ` Martin Jansa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56DE02D8.9060002@linux.intel.com \
    --to=randy.e.witt@linux.intel.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=ed.bartosh@linux.intel.com \
    --cc=peter.kjellerstedt@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.