summaryrefslogtreecommitdiffstats
path: root/python.d
diff options
context:
space:
mode:
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