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:
@@ -42,7 +42,7 @@ class Connector(GenericConnector):
|
||||
try:
|
||||
self.connector = pymssql.connect(host="%s:%d" % (self.hostname, self.port), user=self.user, password=self.password, database=self.db, login_timeout=conf.timeout, timeout=conf.timeout)
|
||||
except pymssql.OperationalError, msg:
|
||||
raise SqlmapConnectionException, msg
|
||||
raise SqlmapConnectionException(msg)
|
||||
|
||||
self.setCursor()
|
||||
self.connected()
|
||||
@@ -60,7 +60,7 @@ class Connector(GenericConnector):
|
||||
except (pymssql.OperationalError, pymssql.ProgrammingError), msg:
|
||||
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % msg)
|
||||
except pymssql.InternalError, msg:
|
||||
raise SqlmapConnectionException, msg
|
||||
raise SqlmapConnectionException(msg)
|
||||
|
||||
def select(self, query):
|
||||
self.execute(query)
|
||||
|
||||
Reference in New Issue
Block a user