diff options
author | Facetoe <facetoe@facetoe.com.au> | 2016-11-30 18:54:28 +0800 |
---|---|---|
committer | Facetoe <facetoe@facetoe.com.au> | 2016-11-30 18:56:26 +0800 |
commit | 6084cac8478a65dde5c9c592f85ce189f3e2bf4a (patch) | |
tree | a343f768f157bb373ce4ceacd22fc57866e62a2a /python.d | |
parent | 322d10a2252d1652b3137c1abacc8a355697e1f9 (diff) |
Print useful error message when postgres plugin job fails.
Diffstat (limited to 'python.d')
-rw-r--r-- | python.d/postgres.chart.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/python.d/postgres.chart.py b/python.d/postgres.chart.py index cd99bdfc9d..257e66205a 100644 --- a/python.d/postgres.chart.py +++ b/python.d/postgres.chart.py @@ -7,7 +7,6 @@ from copy import deepcopy import psycopg2 from psycopg2 import extensions -from psycopg2._psycopg import DatabaseError from psycopg2.extras import DictCursor from base import SimpleService @@ -222,10 +221,8 @@ class Service(SimpleService): self._create_definitions() return True - except DatabaseError: - return False except Exception as e: - self.error(e) + self.error(str(e)) return False def _discover_databases(self, cursor): |