Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patrick Ohly <patrick.ohly@intel.com>,
	"Burton, Ross" <ross.burton@intel.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] QemuRunner: avoid tainting os.environ
Date: Wed, 03 May 2017 13:53:20 +0100	[thread overview]
Message-ID: <1493816000.23535.73.camel@linuxfoundation.org> (raw)
In-Reply-To: <1493813847.4241.251.camel@intel.com>

On Wed, 2017-05-03 at 14:17 +0200, Patrick Ohly wrote:
> On Wed, 2017-05-03 at 13:00 +0100, Burton, Ross wrote:
> > 
> > 
> > On 3 May 2017 at 12:53, Patrick Ohly <patrick.ohly@intel.com>
> > wrote:
> >         Then it wouldn't get logged. Not a particularly strong
> >         argument, though.
> >         If that's preferred, I can change the implementation.
> >         
> > 
> > 
> > I prefer the clarity of copying os.environ and adding to it over
> > running env, especially as you have whitespace/quoting to deal
> > with.
> > The variables added to the environment could easily be logged
> > separately, surely?
> They could be logged in start(), but at the moment the logging is in
> launch(), and if we keep the semantic the same as in
> subprocess.Popen()
> (i.e. caller provides entire environment), then that logging doesn't
> know which env variables might be worth logging.
> 
> Anyway, the variables weren't logged before either, so I'll just keep
> that and change to passing an env dict.

You could pass in the specific env delta you want to the function and
leave launch to infill anything which isn't set?

Cheers,

Richard


  parent reply	other threads:[~2017-05-03 12:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-03 10:56 [PATCH] QemuRunner: avoid tainting os.environ Patrick Ohly
2017-05-03 11:13 ` Richard Purdie
2017-05-03 11:53   ` Patrick Ohly
2017-05-03 12:00     ` Burton, Ross
2017-05-03 12:17       ` Patrick Ohly
2017-05-03 12:20         ` Burton, Ross
2017-05-03 12:40         ` Patrick Ohly
2017-05-03 13:08           ` Burton, Ross
2017-05-03 13:38             ` Patrick Ohly
2017-05-03 12:53         ` Richard Purdie [this message]
2017-05-03 13:08           ` Patrick Ohly

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=1493816000.23535.73.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=patrick.ohly@intel.com \
    --cc=ross.burton@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox