[Sugar-devel] Ignoring certain exceptions while debugging...?

Martin Langhoff martin.langhoff at gmail.com
Wed Feb 11 05:24:51 EST 2009


On Wed, Feb 11, 2009 at 11:18 PM, Martin Langhoff
<martin.langhoff at gmail.com> wrote:
> Having said that, there's a bug. The 'except' line in the patch should
> be a bare 'except:'.

In my last patch, I mistakenly committed an 'except IOError:' instead
of a bare 'except:'. I changed the exception as a debugging measure:
for that particular try/except, I wanted to _see_ the exception.

Commenting out the try/except lines doesn't work very well with this
whitespace-panicy interpreter, unfortunately, and de-indenting and
re-indenting large chunks of code has its own risks because we don't
have start/end block braces.

So I was a little bit stuck on this -- catching a narrower exception
sounded like a good temporary hack, and got me through... but then got
through my pre-commit review. It looks like an honest exception!

Is there a better way?



martin at letting-your-uselessness-with-python-hang-out...
-- 
 martin.langhoff at gmail.com
 martin at laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff


More information about the Sugar-devel mailing list