瀏覽代碼

wxGUI: fix extension manager when metadata are not available

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@64728 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 10 年之前
父節點
當前提交
c5a244c80b
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      gui/wxpython/core/treemodel.py

+ 4 - 1
gui/wxpython/core/treemodel.py

@@ -195,7 +195,10 @@ class ModuleNode(DictNode):
         if not self.data:
             return False
         if key in ('command', 'keywords', 'description'):
-            return len(self.data[key]) and value in self.data[key]
+            try:
+                return len(self.data[key]) and value in self.data[key]
+            except KeyError:
+                return False
         
         return False