Browse Source

add TypeError in except (#5833)

Ilya Mashchenko 6 years ago
parent
commit
a89328ab66
1 changed files with 2 additions and 2 deletions
  1. 2 2
      collectors/python.d.plugin/couchdb/couchdb.chart.py

+ 2 - 2
collectors/python.d.plugin/couchdb/couchdb.chart.py

@@ -351,7 +351,7 @@ class Service(UrlService):
                 try:
                     for m in metrics_list:
                         value = value[m]
-                except KeyError as e:
+                except (KeyError, TypeError) as e:
                     self.debug('cannot process ' + metric + ' for ' + db
                                + ": " + str(e))
                     continue
@@ -367,7 +367,7 @@ class Service(UrlService):
             try:
                 for m in metrics_list:
                     value = value[m]
-            except KeyError as e:
+            except (KeyError, TypeError) as e:
                 self.debug('cannot process ' + metric + ': ' + str(e))
                 continue
             # strip off .value from end of stat