Fixed some code leading to an enchant error. 6_0_x

Sun, 08 Mar 2015 12:05:08 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 08 Mar 2015 12:05:08 +0100
branch
6_0_x
changeset 4167
763149f3a87e
parent 4159
ba30f95a0ec2
child 4168
ecb9c1a0e191

Fixed some code leading to an enchant error.
(grafted from 9eaeac74fd91f314787bfdf4ef7296dfd4bbe0a5)

QScintilla/SpellChecker.py file | annotate | diff | comparison | revisions
--- a/QScintilla/SpellChecker.py	Sat Mar 07 12:41:21 2015 +0100
+++ b/QScintilla/SpellChecker.py	Sun Mar 08 12:05:08 2015 +0100
@@ -525,8 +525,12 @@
                 self.pos = wordEnd
                 if (wordEnd - wordStart) >= self.minimumWordSize and \
                    self.__checkRegion(wordStart):
-                    if spell.check(word):
-                        continue
+                    try:
+                        if spell.check(word):
+                            continue
+                    except enchant.errors.Error:
+                        # ignore these
+                        pass
                     if word in self.__ignoreWords:
                         continue
                     self.word = word

eric ide

mercurial