@cryptotaxi247 / netdata-1 / commits / a89328ab6

add TypeError in except (#5833)

Ilya Mashchenko committed Apr 11, 2019 at 10:46 UTC a89328ab66534cf18cf9a9887ffd708bc426d309
1 file changed +2 -2
collectors/python.d.plugin/couchdb/couchdb.chart.py
+2 -2
@@ -351,7 +351,7 @@ class Service(UrlService):
351 try:
352 for m in metrics_list:
353 value = value[m]
354 - except KeyError as e:
354 + except (KeyError, TypeError) as e:
355 self.debug('cannot process ' + metric + ' for ' + db
356 + ": " + str(e))
357 continue
@@ -367,7 +367,7 @@ class Service(UrlService):
367 try:
368 for m in metrics_list:
369 value = value[m]
370 - except KeyError as e:
370 + except (KeyError, TypeError) as e:
371 self.debug('cannot process ' + metric + ': ' + str(e))
372 continue
373 # strip off .value from end of stat