From: paulfantom Date: Sat, 2 Jul 2016 21:01:07 +0000 (+0200) Subject: better error messages X-Git-Tag: v1.3.0~95^2 X-Git-Url: https://arthur.barton.de/gitweb/?a=commitdiff_plain;h=ba417a23c8d95a8312369305b2d9f272923fbc80;p=netdata.git better error messages --- diff --git a/python.d/mysql.chart.py b/python.d/mysql.chart.py index 162879fe..982d2513 100644 --- a/python.d/mysql.chart.py +++ b/python.d/mysql.chart.py @@ -2,12 +2,9 @@ # Description: MySQL netdata python.d plugin # Author: Pawel Krupa (paulfantom) -import os from base import SimpleService import msg -NAME = os.path.basename(__file__).replace(".chart.py", "") - # import 3rd party library to handle MySQL communication try: import MySQLdb @@ -355,7 +352,7 @@ class Service(SimpleService): port=self.configuration['port'], connect_timeout=self.update_every) except Exception as e: - self.error(NAME + " has problem connecting to server:", e) + self.error("problem connecting to server:", e) raise RuntimeError def _format_data(self): @@ -373,7 +370,7 @@ class Service(SimpleService): cursor.execute(QUERY) raw_data = cursor.fetchall() except Exception as e: - self.error(NAME + ": cannot execute query.", e) + self.error("cannot execute query.", e) self.connection.close() self.connection = None return None