summaryrefslogtreecommitdiffstats
path: root/python.d
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@tsaousis.gr>2016-11-14 22:18:24 +0200
committerGitHub <noreply@github.com>2016-11-14 22:18:24 +0200
commit865c7caae45ed828fd70c7995e305150c753b19a (patch)
tree925c878e3fc28a750e4ea2ea819046acf27e93c2 /python.d
parentbfc740c587f758fc4737407d979435a604f71edf (diff)
parentfb70892b8c225680155bd5abdb95758fd30c0a8d (diff)
Merge pull request #1184 from facetoe/postgres_plugin_error_message
Ignore expected exceptions.
Diffstat (limited to 'python.d')
-rw-r--r--python.d/postgres.chart.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python.d/postgres.chart.py b/python.d/postgres.chart.py
index 6bb7d4b564..cd99bdfc9d 100644
--- a/python.d/postgres.chart.py
+++ b/python.d/postgres.chart.py
@@ -7,6 +7,7 @@ from copy import deepcopy
import psycopg2
from psycopg2 import extensions
+from psycopg2._psycopg import DatabaseError
from psycopg2.extras import DictCursor
from base import SimpleService
@@ -221,6 +222,8 @@ class Service(SimpleService):
self._create_definitions()
return True
+ except DatabaseError:
+ return False
except Exception as e:
self.error(e)
return False