We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de66b64 commit 4451ac8Copy full SHA for 4451ac8
nsdb/Database.py
@@ -6,7 +6,6 @@
6
"""
7
8
import mysql.connector as sql
9
-from mysql.connector import errorcode
10
11
12
def connect():
@@ -30,9 +29,9 @@ def connect():
30
29
cursor = database.cursor()
31
32
except sql.Error as err:
33
- if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
+ if err.errno == sql.errorcode.ER_ACCESS_DENIED_ERROR:
34
print("Something is wrong with your user name or password")
35
- elif err.errno == errorcode.ER_BAD_DB_ERROR:
+ elif err.errno == sql.errorcode.ER_BAD_DB_ERROR:
36
print("Database does not exist")
37
else:
38
print(err)
0 commit comments