]> arthur.barton.de Git - netdata.git/commitdiff
better handling of lacking 3rd party libs
authorpaulfantom <paulfantom@gmail.com>
Sat, 18 Jun 2016 17:36:37 +0000 (19:36 +0200)
committerpaulfantom <paulfantom@gmail.com>
Sat, 18 Jun 2016 17:36:37 +0000 (19:36 +0200)
python.d/mysql.chart.py

index 793b6aec4535e596f9b618a399217ba028d14bb1..01216c83b534098db2d9cd89ca4258ec45e3ca0f 100644 (file)
@@ -4,8 +4,6 @@
 NAME = "mysql.chart.py"
 import sys
 
-sys.path.append("./python_modules") #FIXME it is here for debug only
-
 # import 3rd party library to handle MySQL communication
 try:
     import MySQLdb
@@ -17,7 +15,8 @@ except ImportError:
         # https://github.com/PyMySQL/PyMySQL
         sys.stderr.write(NAME + ": using pymysql\n")
     except ImportError:
-        sys.stderr.write(NAME + ": You need to install PyMySQL module to use mysql.chart.py plugin\n")
+        sys.stderr.write(NAME + ": You need to install MySQLdb or PyMySQL module to use mysql.chart.py plugin\n")
+        raise ImportError
 
 from base import BaseService