[orca/gnome-2-26] Fix for bgo#586890 - Orca 2.27.3 and earlier will crash if liblouis 1.6.2 python bindings are instal
- From: William Walker <wwalker src gnome org>
- To: svn-commits-list gnome org
- Subject: [orca/gnome-2-26] Fix for bgo#586890 - Orca 2.27.3 and earlier will crash if liblouis 1.6.2 python bindings are instal
- Date: Thu, 25 Jun 2009 00:04:07 +0000 (UTC)
commit 9765fd9ea77daaf785b15f2f57ed2497fe79975a
Author: Willie Walker <william walker sun com>
Date: Wed Jun 24 20:02:39 2009 -0400
Fix for bgo#586890 - Orca 2.27.3 and earlier will crash if liblouis 1.6.2 python bindings are installed
src/orca/braille.py | 27 +++++++++++++++++++--------
1 files changed, 19 insertions(+), 8 deletions(-)
---
diff --git a/src/orca/braille.py b/src/orca/braille.py
index 122cf9b..b518da8 100644
--- a/src/orca/braille.py
+++ b/src/orca/braille.py
@@ -36,14 +36,6 @@ log = logging.getLogger("braille")
import signal
-try:
- import louis
-except ImportError:
- louis = None
- _defaultContractionTable = None
-else:
- _defaultContractionTable = louis.getDefaultTable()
-
# We'll use the official BrlAPI pythons (as of BrlTTY 3.8) if they
# are available. Otherwise, we'll fall back to our own bindings.
#
@@ -74,6 +66,25 @@ import eventsynthesizer
import orca_state
import settings
+try:
+ import louis
+ _defaultContractionTable = louis.getDefaultTable()
+except:
+ louis = None
+ _defaultContractionTable = None
+
+if louis:
+ version = louis.version()
+ [major, minor, point] = louis.version().split(".", 2)
+ major = int(major)
+ minor = int(minor)
+ if (major > 1) or (major == 1 and minor > 5):
+ debug.println(debug.LEVEL_SEVERE,
+ "You have liblouis %s installed. "\
+ "liblouis 1.5.2 or earlier is needed." % version)
+ louis = None
+ _defaultContractionTable = None
+
from orca_i18n import _ # for gettext support
# If True, this module has been initialized.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]