[pony-build] Context Failures

Max Laite mlaite at gmail.com
Sun Apr 25 18:54:10 PDT 2010


Ah, try/finally worked out pretty good. I will get this stuff figured out
eventually, or maybe not. haha

Will look at the redundant success loop and push some more changes sometime
this week.

May be a little slow though next couple weeks, got end semester stuff and
carnival.

Thanks!

Max

On Sun, Apr 25, 2010 at 9:20 PM, C. Titus Brown <ctb at msu.edu> wrote:

> On Sat, Apr 24, 2010 at 08:27:02PM -0400, Max Laite wrote:
> > 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.
>
> Cool -- let me know when you figure out what changes you want to make :).
> Looks good, thanks!
>
> I also wanted to point out a few things:
>
> around
> http://github.com/mlaite/pony-build/blob/env/client/pony_client.py#L813,
>
> you're violating "Don't Repeat Yourself (DRY)" -- context.end_command() and
> reslist.append are called both within and without the 'except' (and
> incidentally, in different orders.  tsk tsk.).  I think with a teensy bit
> of refactoring and judicious use of 'try/finally', you could make this
> a bit shorter and a lot neater.
>
> Note that the 'success' for loop (line 829 onwards) is pretty redundant;
> you can do that same logic within the main command loop, I think.
>
> Whaddya say?
>
> thanks,
> --titus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/pony-build/attachments/20100425/6f3b3746/attachment.htm>


More information about the pony-build mailing list