From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 1F349138247 for ; Thu, 19 Dec 2013 07:05:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D99D7E0969; Thu, 19 Dec 2013 07:05:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5B88FE0969 for ; Thu, 19 Dec 2013 07:05:28 +0000 (UTC) Received: from [192.168.1.210] (S010600222de111ff.vc.shawcable.net [96.49.5.156]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: dolsen) by smtp.gentoo.org (Postfix) with ESMTPSA id 75AA233F42F for ; Thu, 19 Dec 2013 07:05:27 +0000 (UTC) Message-ID: <1387436711.3897.211.camel@big_daddy.dol-sen.ca> Subject: Re: [gentoo-catalyst] [PATCH] The string module is deprecated, stop using it. From: Brian Dolbec To: gentoo-catalyst@lists.gentoo.org Date: Wed, 18 Dec 2013 23:05:11 -0800 In-Reply-To: <20131219063924.GR25409@odin.tremily.us> References: <1387430286-30467-1-git-send-email-antarus@gentoo.org> <20131219063924.GR25409@odin.tremily.us> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-1QIU8372D9VsBMrpNsue" X-Mailer: Evolution 3.6.4 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org Mime-Version: 1.0 X-Archives-Salt: f851a558-a181-42cf-bffd-d79e14c3afc9 X-Archives-Hash: a030f6de3dea9ede9ab35b0eccf2b493 --=-1QIU8372D9VsBMrpNsue Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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]=3Dconfdefaults[x] > > =20 > > + options =3D 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"]=3D"1" > > =20 > > - if "bindist" in string.split(conf_values["options"]): > > + if "bindist" in options: > > print "Binary redistribution enabled" > > conf_values["BINDIST"]=3D"1" > > else: >=20 > 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. >=20 > Cheers, > Trevor >=20 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. --=-1QIU8372D9VsBMrpNsue Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQF8BAABCgBmBQJSspqnXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4Njg4RkQxQ0M3MUMxQzA0RUFFQTQyMzcy MjE0RDkwQTAxNEYxN0NCAAoJECIU2QoBTxfL4R8IALPWSAHobMGsH+8Hi2yXUWRf FZnOxz2oJdlcLxoqVIcNmWlOTitEoWNDD1RfglOuXX0jO9NZAMf7rTJAtr5VoKtt GBZLiPlal1itemMX6afe/ZFFnlywt1WZRnTwg8SWGtlvzv9zSkHD1ORh6gvJGdMA BgmQI+9tmY0XCA9+idSuTvJqmLozZI1KXRNVvEoeiCAurM02sZu7Xo0BswmL5L9z 7hnoQeE0p/TF40gxoqPK9jbRniQSqxmwYal9QF6qjPvvhetomTk/mpdSGv7P0euV Uz6WiT7BHxCiDDUg18il5qBabnHcjJz0PDQbf49F3dYk3emPHd0hbJjkycasv+E= =e2G9 -----END PGP SIGNATURE----- --=-1QIU8372D9VsBMrpNsue--