Fixed an issue on Windows in the APIs manager when a lexer return None. 5_3_x

Tue, 19 Nov 2013 20:00:01 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 19 Nov 2013 20:00:01 +0100
branch
5_3_x
changeset 3094
f453f3040984
parent 3093
a0cf4c26566f
child 3097
4778daba0f19

Fixed an issue on Windows in the APIs manager when a lexer return None.

QScintilla/APIsManager.py file | annotate | diff | comparison | revisions
--- a/QScintilla/APIsManager.py	Sun Nov 17 15:06:51 2013 +0100
+++ b/QScintilla/APIsManager.py	Tue Nov 19 20:00:01 2013 +0100
@@ -170,13 +170,16 @@
                                         "PyQt4", "qsci")
                 if os.path.exists(qsciPath):
                     # it's the installer
-                    apidir = os.path.join(qsciPath, "api", self.__lexer.lexer())
-                    fnames = []
-                    filist = QDir(apidir).entryInfoList(["*.api"], QDir.Files,
-                                                        QDir.IgnoreCase)
-                    for fi in filist:
-                        fnames.append(fi.absoluteFilePath())
-                    return fnames
+                    if self.__lexer.lexer() is not None:
+                        apidir = os.path.join(qsciPath, "api", self.__lexer.lexer())
+                        fnames = []
+                        filist = QDir(apidir).entryInfoList(["*.api"], QDir.Files,
+                                                            QDir.IgnoreCase)
+                        for fi in filist:
+                            fnames.append(fi.absoluteFilePath())
+                        return fnames
+                    else:
+                        return []
             
             return self.__apis.installedAPIFiles()
         else:

eric ide

mercurial