[blivet][master] Convert _parseUnits to public function

Anne Mulhern amulhern at redhat.com
Fri Feb 13 17:37:37 UTC 2015


My guess is that you will be better off using named
constants (instead of strings) for units, somehow, in blivet-gui,
rendering this change unnecessary.

But I don't feel that making parseUnit() public is really a problem,
either.

- mulhern

----- Original Message -----
> From: "Vojtěch Trefný" <vtrefny at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Thursday, February 12, 2015 11:49:06 AM
> Subject: Re: [blivet][master] Convert _parseUnits to public function
> 
> Ok. Main reason behind this change is the change of
> blivet.size.convertTo function which no longer takes strings as input
> (https://github.com/rhinstaller/blivet/commit/f519a8eff823d33889f03baaf6226cf1031ecfdb).
> I'm using this function quite a lot in blivet-gui and mostly in the gui
> part where users can set unit for "select size" widgets and it would
> take too much coding to change everything to use these new size
> constants instead of strings. parseUnits allows me to do just a small
> change to existing code for rawhide builds but I'm not fan of using
> private functions (and pylint really hates it too).
> 
> vtrefny
> 
> Dne 12.2.2015 v 10:53 Vratislav Podzimek napsal(a):
> > On Thu, 2015-02-12 at 10:21 +0100, Vojtech Trefny wrote:
> > Some explanation here would be useful. ;)
> >
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 


More information about the anaconda-patches mailing list