Skip to content

Commit 4451ac8

Browse files
committed
remove unnecessary import
1 parent de66b64 commit 4451ac8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

nsdb/Database.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"""
77

88
import mysql.connector as sql
9-
from mysql.connector import errorcode
109

1110

1211
def connect():
@@ -30,9 +29,9 @@ def connect():
3029
cursor = database.cursor()
3130

3231
except sql.Error as err:
33-
if err.errno == errorcode.ER_ACCESS_DENIED_ERROR:
32+
if err.errno == sql.errorcode.ER_ACCESS_DENIED_ERROR:
3433
print("Something is wrong with your user name or password")
35-
elif err.errno == errorcode.ER_BAD_DB_ERROR:
34+
elif err.errno == sql.errorcode.ER_BAD_DB_ERROR:
3635
print("Database does not exist")
3736
else:
3837
print(err)

0 commit comments

Comments
 (0)