Fixed an issue which would cause a traceback if the plug-in is used with eric 5.1.

Sat, 01 Oct 2011 16:47:20 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 01 Oct 2011 16:47:20 +0200
changeset 40
f22c4a330026
parent 39
7b6ca9397ecc
child 41
333735b1a460

Fixed an issue which would cause a traceback if the plug-in is used with eric 5.1.

AssistantEric/APIsManager.py file | annotate | diff | comparison | revisions
PluginAssistantEric.zip file | annotate | diff | comparison | revisions
--- a/AssistantEric/APIsManager.py	Sat Oct 01 16:21:09 2011 +0200
+++ b/AssistantEric/APIsManager.py	Sat Oct 01 16:47:20 2011 +0200
@@ -162,11 +162,15 @@
                 if language:
                     apiGenerator = APIGenerator(module)
                     apis = apiGenerator.genAPI(True, "", True)
-                    basesDict = apiGenerator.genBases(True)
-                    for baseEntry in basesDict:
-                        if basesDict[baseEntry]:
-                            bases.append("{0} {1}\n".format(
-                                baseEntry, " ".join(sorted(basesDict[baseEntry]))))
+                    try:
+                        basesDict = apiGenerator.genBases(True)
+                        for baseEntry in basesDict:
+                            if basesDict[baseEntry]:
+                                bases.append("{0} {1}\n".format(
+                                    baseEntry, " ".join(sorted(basesDict[baseEntry]))))
+                    except AttributeError:
+                        # eric 5.1 doesn't have this method
+                        pass
             except (IOError, ImportError):
                 pass
         else:
Binary file PluginAssistantEric.zip has changed

eric ide

mercurial