@cryptotaxi247 / netdata-1 / commits / 868d95de1

icecast fix (#4448)

Ilya Mashchenko committed Oct 23, 2018 at 02:11 UTC 868d95de170998762cdd79ad8a0046f930d03964
1 file changed +5 -1
collectors/python.d.plugin/icecast/icecast.chart.py
+5 -1
@@ -90,4 +90,8 @@ class Service(UrlService):
90 self.error('JSON decode error:', error)
91 return None
92
93 - return data['icestats'].get('source')
93 + sources = data['icestats'].get('source')
94 + if not sources:
95 + return None
96 +
97 + return sources if isinstance(sources, list) else [sources]