[pony-build] Context Failures

C. Titus Brown ctb at msu.edu
Sun Apr 25 18:20:41 PDT 2010


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



More information about the pony-build mailing list