[orca/gnome-3-2] Fix for bug 659122 - Traceback presenting time and date



commit 81ded18fa56174730ad79f686c28952a0df48ef1
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Fri Sep 30 15:53:50 2011 -0400

    Fix for bug 659122 - Traceback presenting time and date

 src/orca/scripts/default.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index 3c7c3f7..4d5625e 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -5787,6 +5787,11 @@ class Script(script.Script):
     def presentTime(self, inputEvent):
         """ Presents the current time. """
         timeFormat = _settingsManager.getSetting('presentTimeFormat')
+        try:
+            timeFormat = timeFormat.encode("UTF-8")
+        except UnicodeDecodeError:
+            pass
+
         message = time.strftime(timeFormat, time.localtime())
         self.presentMessage(message)
         return True
@@ -5794,6 +5799,11 @@ class Script(script.Script):
     def presentDate(self, inputEvent):
         """ Presents the current date. """
         dateFormat = _settingsManager.getSetting('presentDateFormat')
+        try:
+            dateFormat = dateFormat.encode("UTF-8")
+        except UnicodeDecodeError:
+            pass
+
         message = time.strftime(dateFormat, time.localtime())
         self.presentMessage(message)
         return True



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]