On Thu, 2013-11-28 at 15:14 +0100, Vratislav Podzimek wrote:
If no size is given, we shouldn't try to investigate the string.
Treat it as an
english spec instead which means falling back to the old behaviour.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/gui/spokes/custom.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index b142364..fcbb859 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -153,7 +153,7 @@ def size_from_entry(entry):
try:
# if no unit was specified, default to MB. Assume that a string
# ending with any kind of a letter has a unit suffix.
- if unicodedata.category(size_text[-1]).startswith("L"):
+ if size_text and unicodedata.category(size_text[-1]).startswith("L"):
size = Size(spec=size_text)
else:
size = Size(en_spec="%sMB" % size_text)
Thanks, looks good.
ACK! :)