[PATCH] Move Anaconda version detection from isys to Python code

Brian C. Lane bcl at redhat.com
Wed May 21 00:46:11 UTC 2014


On Tue, May 20, 2014 at 10:14:20AM -0400, Anne Mulhern wrote:
> ----- Original Message -----
> > From: "Vratislav Podzimek" <vpodzime at redhat.com>
> > To: "anaconda patch review" <anaconda-patches at lists.fedorahosted.org>
> > Sent: Tuesday, May 20, 2014 7:26:54 AM
> > Subject: Re: [PATCH] Move Anaconda version detection from isys to Python code
> > 
> > On Mon, 2014-05-19 at 14:35 -0400, Anne Mulhern wrote:
> > > It might be
> > > better to check for the existance of the version.py file, rather than
> > > whether
> > > or not an ImportError was raised on importing it, in determining the
> > > existance
> > > of the version since ImportErrors can be raised for lots of reasons. Also,
> > > I
> > > prefer None to 'unknown version'.
> > I prefer "uknown version". The function is supposed to return a string,
> > so it should return a string. Or it could raise an exception, but we
> > should stop misusing None this way.
> 
> I don't understand what is meant by a misuse of None or by the statement
> that the function is supposed to return a string, so it should return a
> string.

I think the point here is that we simply want a string to pass on, not
to have to check for None and then convert that to a string to be passed
on.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list