[pony-build] Context Failures

Max Laite mlaite at gmail.com
Sat Apr 24 17:27:02 PDT 2010


Whoops, guess I did not.

http://github.com/mlaite/pony-build/commit/dbc6e54b65689ca27d71e7c9290ca897e789259a

Still passes all the context tests. Yay :)

Though, I think we may have to change up the tests for the c.run()
try/except block a bit to make sure it works as intended. What those changes
are? --I am not sure yet, have to formulate my thoughts I guess.

Ummmm, yup, that is about it for now.

Max

On Fri, Apr 23, 2010 at 11:18 PM, C. Titus Brown <ctb at msu.edu> wrote:

> On Fri, Apr 23, 2010 at 01:12:24PM -0400, Max Laite wrote:
> > 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.
>
> sounds great - errm, did you push this to github?
>
> > 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?
>
> Yes, that would be awesome.  And I think a good default.
>
> --titus
>
> > 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
> > >
>
> --
> C. Titus Brown, ctb at msu.edu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/pony-build/attachments/20100424/7bb2cfa6/attachment.htm>


More information about the pony-build mailing list