[Yum-devel] Re: [yum-cvs] yum/rpmUtils miscutils.py,1.13,1.14

seth vidal skvidal at linux.duke.edu
Fri Aug 25 11:51:02 UTC 2006


On Fri, 2006-08-25 at 08:47 +0100, Menno Smits wrote:
> If flagToString() can't interpret the flags ("Umm...now I'm screwed") 
> then it should either raise an exception or return a suitable string 
> value (eg. "??") as the caller expects a string (or None).
> 
> An exception is probably a better option. It is better to fail early so 
> that problems are found and fixed rather than staying hidden. There's 
> other places in the Yum code that suffer from this issues. Execution 
> continues when something odd happens rather than bailing out.
> 
> Menno
> 
> ps. Useful link related to this kind of thing (examples in Java but 
> still useful for any language) 
> http://www.martinfowler.com/ieeeSoftware/failFast.pdf
> 

But in this case I borrowed the same code we use in createrepo to parse
the flags and afaict that code covers all the options.

Though I can understand putting in an 'else' result there.

-sv





More information about the Yum-devel mailing list