RefactoringRope/CodeAssistServer.py

branch
server_client_variant
changeset 219
c85d02ca2fa9
parent 217
874115c79ca7
child 220
763ef93fabee
diff -r 5e50a885778c -r c85d02ca2fa9 RefactoringRope/CodeAssistServer.py
--- a/RefactoringRope/CodeAssistServer.py	Sat Oct 14 19:31:53 2017 +0200
+++ b/RefactoringRope/CodeAssistServer.py	Sun Oct 15 19:30:10 2017 +0200
@@ -374,16 +374,17 @@
         @param result dictionary containing the result sent by the client
         @type dict
         """
+        docu = None
+        
         if "Error" not in result:
             documentationDict = result["DocumentationDict"]
-            if "module" in documentationDict:
-                documentationDict["note"] = \
-                    self.tr("Present in {0} module").format(
-                        documentationDict["module"])
-                del documentationDict["module"]
-            docu = documentationDict
-        else:
-            docu = None
+            if documentationDict:
+                if "module" in documentationDict:
+                    documentationDict["note"] = \
+                        self.tr("Present in {0} module").format(
+                            documentationDict["module"])
+                    del documentationDict["module"]
+                docu = documentationDict
         
         self.__documentationViewer.documentationReady(docu)
     

eric ide

mercurial