[pony-build] Context Failures

Max Laite mlaite at gmail.com
Fri Apr 23 10:12:24 PDT 2010


Added some log_error stuff....

Also added  reslist.append(c.get_results()) to the c.run() try/except. This
should grab the results for passing to the server properly if exception is
raised.

Added the state of initialized to the client_info dict, so we can see status
of that on web interface also.

Then just an extra thought to throw out there....

Do we want to provide a higher level of feedback somehow on the web side? Do
we want to store the log data for reporting if they choose to use -v or
--debug? To a file to upload?

Max

On Thu, Apr 22, 2010 at 4:06 PM, C. Titus Brown <ctb at msu.edu> wrote:

> On Thu, Apr 22, 2010 at 03:49:07PM -0400, Max Laite wrote:
> > env
> >
> > Tests:
> >
> http://github.com/mlaite/pony-build/commit/3b3e53d15f0f8a83b927310507c8fb3095d813e9
> >
> > pony_client:
> >
> http://github.com/mlaite/pony-build/commit/150e3e1acab9cc78d13e85d181e3c705520b16a4
>
> Hey Max,
>
> a couple of comments :)
>
> --
>
> 'init_status' is not very clear as a flag name goes.  Maybe 'initialized'?
>
> --
>
> How about creating a new context object of type 'Context' if context is
> None
> in the 'do' function?  'Context' does a bunch of useful stuff, and it would
> simplify all of your 'if' statements down to one 'if' at the beginning:
>
>        if context is None:
>                context = Context()
>
> --
>
> try/except with blanket 'except' and no reporting, e.g.
>
>        try:
>                # foo bar baz
>        except:
>                # cleanup with no reporting
>
> is a Bad Idea.  I see a few problems with your code:
>
>  - 'success' may still be set to True even if a c.run() call raises an
>   exception.
>
>  - there's no logging whatsoever; at the very least every 'except' branch
>   should have some sort of log_error call.  Right now the excepts will
>   catch everything, including genuine programming errors, silently!
>
> --
>
> Hmm, that's enough for now...
>
> thanks,
> --titus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/pony-build/attachments/20100423/4632a73b/attachment.html>


More information about the pony-build mailing list