[rhinstaller/blivet/pulls/124 master] Master keepers b

mulkieran installerbot-noreply at redhat.com
Tue May 26 11:55:49 UTC 2015


That's exactly what I'm trying to do. It's what I explained in the comment. The problem is in making sure that the numeric part doesn't get confused with a unit spec, since they both can contain non-numbers.

The best design initially would have been to require whitespace between magnitude and unit specification. Then [^\s]+\s+[^\s]*, or something similar, would have covered all situations and Decimal constructor, etc. could have done all the remaining heavy lifting. Unfortunately, because we allow specs like "1KiB" (no space to separate magnitude from unit spec), that is just not an option, AFAIK.

If it is an option, I'm delighted, and happy to ditch the current regular expression for a much simpler one.
-- 
To view this pull request on github, visit https://github.com/rhinstaller/blivet/pull/124


More information about the anaconda-patches mailing list