public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
From: Brian Dolbec <dolsen@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Subject: Re: [gentoo-catalyst] [PATCH] The string module is deprecated, stop using it.
Date: Wed, 18 Dec 2013 23:05:11 -0800	[thread overview]
Message-ID: <1387436711.3897.211.camel@big_daddy.dol-sen.ca> (raw)
In-Reply-To: <20131219063924.GR25409@odin.tremily.us>

[-- Attachment #1: Type: text/plain, Size: 1531 bytes --]

On Wed, 2013-12-18 at 22:39 -0800, W. Trevor King wrote:
> On Wed, Dec 18, 2013 at 09:18:06PM -0800, antarus@gentoo.org wrote:
> > @@ -116,12 +115,13 @@ def parse_config(myconfig):
> >  			print "Setting",x,"to default value \""+confdefaults[x]+"\""
> >  			conf_values[x]=confdefaults[x]
> >  
> > +	options = conf_values["options"].split()
> >  	# parse out the rest of the options from the config file
> > -	if "autoresume" in string.split(conf_values["options"]):
> > +	if "autoresume" in options:
> >  		print "Autoresuming support enabled."
> >  		conf_values["AUTORESUME"]="1"
> >  
> > -	if "bindist" in string.split(conf_values["options"]):
> > +	if "bindist" in options:
> >  		print "Binary redistribution enabled"
> >  		conf_values["BINDIST"]="1"
> >  	else:
> 
> These changes look fine to me, but I'd rather just convert to the
> stdlib's ConfigParser.  That's going to blow away this whole function,
> so I don't see the point in fixing it up now.  Of course, if the
> powers that be think a ConfigParser conversion is in the far-distant
> future, then I'm ok with this as a temporary cleanup.
> 
> Cheers,
> Trevor
> 

There's more, I have a commit in the rewrite that removes the
duplication of options and the resulting standalone boolean variables.
Instead, I turn options into a set which eliminates the possibility of
duplicate entries, plus inclusion automatically implies  a True value,
absence a False value.

So even if this was merged, it'd be wiped away soon anyway.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 620 bytes --]

      reply	other threads:[~2013-12-19  7:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19  5:18 [gentoo-catalyst] [PATCH] The string module is deprecated, stop using it antarus
2013-12-19  6:39 ` W. Trevor King
2013-12-19  7:05   ` Brian Dolbec [this message]

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=1387436711.3897.211.camel@big_daddy.dol-sen.ca \
    --to=dolsen@gentoo.org \
    --cc=gentoo-catalyst@lists.gentoo.org \
    /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