summaryrefslogtreecommitdiffstats
path: root/python.d
diff options
context:
space:
mode:
authorpaulfantom <paulfantom@gmail.com>2016-09-25 11:24:16 +0200
committerpaulfantom <paulfantom@gmail.com>2016-09-25 11:24:16 +0200
commit69c18f4e1ac736e4a3c98c4008d8ec548381fb21 (patch)
tree723611227ac74e13b12f881b8b0fff4611d9cfdc /python.d
parent098028852337443bad09539ca24f18878b7a30d7 (diff)
Fix #1007
Diffstat (limited to 'python.d')
-rw-r--r--python.d/nginx_log.chart.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python.d/nginx_log.chart.py b/python.d/nginx_log.chart.py
index 95fb123d2f..9bb403447b 100644
--- a/python.d/nginx_log.chart.py
+++ b/python.d/nginx_log.chart.py
@@ -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