Re: Ignore error with non-zero exit status (was: How to ignore error with anon-zero exit status)

2015-12-20 Thread Ganesh Pal
> (Polite people would *ask* a *question*.) I am a polite person , sorry if the wording was harsh. > (“_a non-zero_”, with a space in-between. “anon” can be misunderstood as an > abbreviation for “anonymous”.) It was a typo. > Most simple solution for this: Do not use a loop. More "complicate

Re: Ignore error with non-zero exit status (was: How to ignore error with anon-zero exit status)

2015-12-20 Thread Chris Angelico
On Mon, Dec 21, 2015 at 8:22 AM, Thomas 'PointedEars' Lahn wrote: > 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(c

Ignore error with non-zero exit status (was: How to ignore error with anon-zero exit status)

2015-12-20 Thread Thomas 'PointedEars' Lahn
Ganesh Pal wrote: > def run_scanner(): > """ > Mount /filesystems and run scanner > """ > for cmd in [" mount /filesystems ", " scanner_start"]: > try: > out, err, ret = run(cmd, timeout=3600) > if ret != 0: > logging.error("Can