[master/f20-branch][PATCH] Don't try to investigate empty string for unicode chars (#1035799)
Vratislav Podzimek
vpodzime at redhat.com
Thu Nov 28 14:14:40 UTC 2013
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 at 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)
--
1.8.4.2
More information about the anaconda-patches
mailing list