]> arthur.barton.de Git - netdata.git/commitdiff
Fix #1007
authorpaulfantom <paulfantom@gmail.com>
Sun, 25 Sep 2016 09:24:16 +0000 (11:24 +0200)
committerpaulfantom <paulfantom@gmail.com>
Sun, 25 Sep 2016 09:24:16 +0000 (11:24 +0200)
python.d/nginx_log.chart.py

index 95fb123d2ffe03487d5ecb78880a115864ea17e6..9bb403447bd300eb665a8fa51691aab06fbfcc30 100644 (file)
@@ -54,7 +54,10 @@ class Service(LogService):
         regex = self.regex
         for line in raw:
             code = regex.search(line)
-            beginning = code.group(1)[0]
+            try:
+                beginning = code.group(1)[0]
+            except AttributeError:
+                return None
 
             if beginning == '2':
                 data["2xx"] += 1