Path: csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!1.eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.python Subject: Re: Ignore error with non-zero exit status Date: Sun, 20 Dec 2015 23:46:50 +0100 Organization: PointedEars Software (PES) Lines: 43 Message-ID: <2062582.Z8LLNUJk5W@PointedEars.de> References: <3883651.fOIMIIEhYO@PointedEars.de> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1450651612 9749 eJwFwQcBwEAIBDBL8KxDDmX4l9DExNk71M3Vzq5ZR8syiqWXpPYhkUMXQEtTpQeOv4cOzP4ZtBEW (20 Dec 2015 22:46:52 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Sun, 20 Dec 2015 22:46:52 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwFwYEBwCAIA7CXdFgK5wjY/09YAvPtzePwA0HZXhPJkKpN38y7sNfAvOgSPzM6Y0zTi6uQfe4Gd8YKzx+C1BXr Cancel-Lock: sha1:sZ2X3Z5JzYe6ORWm/6wWFOyQDIk= X-NNTP-Posting-Host: eJwNxsEBgDAIA8CVBJLAOoB2/xHqvY4h0yZEgYdn3tFzwvozkIkZE/9BvtnBrHKYF7p92boOPBAz Xref: csiph.com comp.lang.python:100637 Chris Angelico wrote: > On Mon, Dec 21, 2015 at 8:22 AM, Thomas 'PointedEars' Lahn > wrote: It is supposed to be an attribution *line*, _not_ an attribution novel. Also, the “(was: …)” part is to be removed from the Subject header field value to complete the change of subject in a thread. >> Python 2.6 (why are you using the oldest Python minor version?) >> introduced string.format(), so you should use that instead of the old >> string format operator (“%”): >> >> logging.error("Can't run {0}; got {1} ({2:d})!".format(cmd, err, ret)) >> >> > > Percent formatting isn't going away. There's no need to tell people to > abandon it in favour of .format(), unless they actually need a feature > of .format(). ,- | | […] | This method of string formatting is the new standard in Python 3, and | should be preferred to the % formatting described in in new code. >> On the other hand, you do not need the format operator to begin with: >> >> logging.error("Can't run %s; got %s (%d)!", cmd, err, ret) >> >> > > See? Another good reason to hang onto percent formatting. Your logic is flawed. -- PointedEars Twitter: @PointedEars2 Please do not cc me. / Bitte keine Kopien per E-Mail.