summaryrefslogtreecommitdiff
path: root/ldtpd
diff options
context:
space:
mode:
authorNagappan Alagappan <nagappan@gmail.com>2012-12-07 00:28:22 -0800
committerNagappan Alagappan <nagappan@gmail.com>2012-12-07 00:28:22 -0800
commit4a173059ce3c44d688a1b01c53c31891b33bb3fd (patch)
tree65b5b0a676562c224135f6cc5ea74ada80df32d2 /ldtpd
parentb7febd17e38aa3ccdb0edffc7215f8c38bff47e9 (diff)
Return unicode
Diffstat (limited to 'ldtpd')
-rw-r--r--ldtpd/combo_box.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/ldtpd/combo_box.py b/ldtpd/combo_box.py
index a89cfac..5bcba60 100644
--- a/ldtpd/combo_box.py
+++ b/ldtpd/combo_box.py
@@ -675,4 +675,9 @@ class ComboBox(Utils, LayeredPane):
if not _ldtpize_accessible_name[1] and not _ldtpize_accessible_name[2]:
raise LdtpServerException("Unable to get currently selected item")
# Return label by value, which is actually selected one
- return _ldtpize_accessible_name[2] or _ldtpize_accessible_name[1]
+ # Preference to label_by rather than label
+ text=_ldtpize_accessible_name[2] or _ldtpize_accessible_name[1]
+ try:
+ return unicode(text)
+ except UnicodeDecodeError:
+ return text