diff options
author | paulfantom <paulfantom@gmail.com> | 2016-09-25 11:24:16 +0200 |
---|---|---|
committer | paulfantom <paulfantom@gmail.com> | 2016-09-25 11:24:16 +0200 |
commit | 69c18f4e1ac736e4a3c98c4008d8ec548381fb21 (patch) | |
tree | 723611227ac74e13b12f881b8b0fff4611d9cfdc /python.d | |
parent | 098028852337443bad09539ca24f18878b7a30d7 (diff) |
Fix #1007
Diffstat (limited to 'python.d')
-rw-r--r-- | python.d/nginx_log.chart.py | 5 |
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 |