[blivet:master] Add ability to match scientific notation in strings.
Vojtěch Trefný
vtrefny at redhat.com
Tue Feb 17 07:25:26 UTC 2015
Oh, I totally forgot. (I really should read my old code more often.)
This method exists because of Gtk.Scale. It returns floats and for small
devices and really "big" units (eg. using TiBs with a 128 MiB flash
drive) I get something like "1e-15" and I need to convert this float to
string with unit and blivet doesn't accept "1e-15 TiB" as a valid size
input. (And there is no simple way to say "i don't want to convert this
float to string without the "e" notation.)
I was planning to edit blivet myself but I totally forgot... So big
thanks for noticing this and making my life easier :-)
Dne 16.2.2015 v 21:12 Anne Mulhern napsal(a):
> In blivetgui there is a convert_to_size() method which does parsing of scientific notation strings.
>
> I'ld rather that size methods handle that parsing, instead, if it is necessary.
>
> - mulhern
>
> ----- Original Message -----
>> From: "Vratislav Podzimek" <vpodzime at redhat.com>
>> To: "anaconda patch review" <anaconda-patches at lists.fedorahosted.org>
>> Sent: Monday, February 16, 2015 3:00:42 PM
>> Subject: Re: [blivet:master] Add ability to match scientific notation in strings.
>>
>> On Mon, 2015-02-16 at 14:14 -0500, mulhern wrote:
>>> The matching regular expression is expanded to include possible
>>> scientific notation in numeric part and to exclude numeric parts
>>> with multiple radices.
>> One easy question: Why? I cannot come up with a situation in my life I
>> came across such notation being used with storage units.
>>
>> --
>> Vratislav Podzimek
>>
>> Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
>>
>> _______________________________________________
>> anaconda-patches mailing list
>> anaconda-patches at lists.fedorahosted.org
>> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>>
> _______________________________________________
> 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