[gnome-builder] gjs-sybmols: Fix some unhandled exceptions



commit 09abee8813a569b851592c00ad89a966dec0bb75
Author: Patrick Griffis <tingping tingping se>
Date:   Fri Sep 29 05:04:54 2017 -0400

    gjs-sybmols: Fix some unhandled exceptions

 src/plugins/gjs-symbols/gjs_symbols.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/gjs-symbols/gjs_symbols.py b/src/plugins/gjs-symbols/gjs_symbols.py
index a2ba59f..ba5be2e 100644
--- a/src/plugins/gjs-symbols/gjs_symbols.py
+++ b/src/plugins/gjs-symbols/gjs_symbols.py
@@ -166,7 +166,7 @@ class JsSymbolTree(GObject.Object, Ide.SymbolTree):
         try:
             callee = dict_['init']['callee']
             return callee['object']['name'].lower() == 'gobject' and callee['property']['name'] == 
'registerClass'
-        except KeyError:
+        except (KeyError, TypeError):
             return False
 
     @staticmethod
@@ -174,7 +174,7 @@ class JsSymbolTree(GObject.Object, Ide.SymbolTree):
         try:
             callee = dict_['init']['callee']
             return callee['object']['name'].lower() in ('gobject', 'lang') and callee['property']['name'] == 
'Class'
-        except KeyError:
+        except (KeyError, TypeError):
             return False
 
     @staticmethod


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]