rabin 7 år sedan
förälder
incheckning
53963f2eca
2 ändrade filer med 4 tillägg och 2 borttagningar
  1. 1 1
      README.md
  2. 3 1
      jupyter-mysql-kernel/kernel.py

+ 1 - 1
README.md

@@ -15,7 +15,7 @@ vi ~/.local/config/mysql_config.json
     "user"     : "root",
     "port"     : "3306",
     "host"     : "127.0.0.1",
-    "charset"  : "utf8"
+    "charset"  : "utf8",
     "password" : "123456"
 }
 ```

+ 3 - 1
jupyter-mysql-kernel/kernel.py

@@ -96,7 +96,9 @@ class MysqlKernel(Kernel):
 		if not code.strip():
 			return self.ok()
 		if not self.connect:
-			return self.err('Unable to connect to Mysql server. Check that the server is running.')
+			msg = 'Unable to connect to Mysql server. Check that the server is running.'
+			self.output(msg)
+			return self.err(msg)
 
 		sql = code.rstrip()
 		output = ''