mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 20:51:31 +00:00
Replacing old and deprecated raise Exception style (PEP8)
This commit is contained in:
@@ -37,7 +37,7 @@ class Connector(GenericConnector):
|
||||
try:
|
||||
self.connector = pymysql.connect(host=self.hostname, user=self.user, passwd=self.password, db=self.db, port=self.port, connect_timeout=conf.timeout, use_unicode=True)
|
||||
except (pymysql.OperationalError, pymysql.InternalError), msg:
|
||||
raise SqlmapConnectionException, msg[1]
|
||||
raise SqlmapConnectionException(msg[1])
|
||||
|
||||
self.setCursor()
|
||||
self.connected()
|
||||
@@ -58,7 +58,7 @@ class Connector(GenericConnector):
|
||||
except (pymysql.OperationalError, pymysql.ProgrammingError), msg:
|
||||
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % msg[1])
|
||||
except pymysql.InternalError, msg:
|
||||
raise SqlmapConnectionException, msg[1]
|
||||
raise SqlmapConnectionException(msg[1])
|
||||
|
||||
self.connector.commit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user