[opensuse-buildservice] [PATCH] optionally show tracebacks upon (many) osc errors
Yo Attached is a patch that shows tracebacks upon many osc errors. It's probably not complete. The motivation is that when working on plugins (and, I assume, osc itself), messages you get from the following except AttributeError, e: print >>sys.stderr, e return 1 aren't very helpful, because there's little indication where the problem lies. But when I add show-python-tracebacks = true to my ~/.oscrc, I can see exactly where and how I'm screwing up -- pretty useful. I have only been running with this patch for about an hour, but it seems to work pretty well so far. Michael.
On 2008-09-19 15:10:33 -0500, Michael Wolf wrote:
Yo
Attached is a patch that shows tracebacks upon many osc errors. It's probably not complete.
The motivation is that when working on plugins (and, I assume, osc itself), messages you get from the following
except AttributeError, e: print >>sys.stderr, e return 1
aren't very helpful, because there's little indication where the problem lies. But when I add
show-python-tracebacks = true
to my ~/.oscrc, I can see exactly where and how I'm screwing up -- pretty useful.
I have only been running with this patch for about an hour, but it seems to work pretty well so far.
osc already has a "--trace" option (you can also add "traceback=1" to your ~/.oscrc to activate it permanently). Additionally you may find the "--debugger" and "--post-mortem" options useful. Marcus --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Fri, Sep 19, 2008 at 10:35:29PM +0200, Marcus Hüwe wrote:
On 2008-09-19 15:10:33 -0500, Michael Wolf wrote:
Yo
Attached is a patch that shows tracebacks upon many osc errors. It's probably not complete.
The motivation is that when working on plugins (and, I assume, osc itself), messages you get from the following
except AttributeError, e: print >>sys.stderr, e return 1
aren't very helpful, because there's little indication where the problem lies. But when I add
show-python-tracebacks = true
to my ~/.oscrc, I can see exactly where and how I'm screwing up -- pretty useful.
I have only been running with this patch for about an hour, but it seems to work pretty well so far.
osc already has a "--trace" option (you can also add "traceback=1" to your ~/.oscrc to activate it permanently). Additionally you may find the "--debugger" and "--post-mortem" options useful.
I have added this as hint to http://en.opensuse.org/Build_Service/osc_plugins Hope this helps. Peter -- Contact: admin@opensuse.org (a.k.a. ftpadmin@suse.com) #opensuse-mirrors on freenode.net Info: http://en.opensuse.org/Mirror_Infrastructure SUSE LINUX Products GmbH Research & Development
participants (3)
-
Marcus Hüwe
-
Michael Wolf
-
Peter Poeml