Fix some errors with pylint

This commit is contained in:
VirtuBox
2019-09-30 12:38:28 +02:00
parent 6c3d645d9e
commit 905ef0660a
6 changed files with 22 additions and 16 deletions

View File

@@ -54,14 +54,14 @@ class WOMysql():
db=db_name, read_default_file='~/.my.cnf')
return connection
except pymysql.err.InternalError as e:
Log.debug(self, str(e))
raise MySQLConnectionError
except DatabaseError as e:
if e.args[1] == '#42000Unknown database \'{0}\''.format(db_name):
raise DatabaseNotExistsError
else:
raise MySQLConnectionError
except pymysql.err.InternalError as e:
Log.debug(self, str(e))
raise MySQLConnectionError
except Exception as e:
Log.debug(self, "[Error]Setting up database: \'" + str(e) + "\'")
raise MySQLConnectionError