Replacing old and deprecated raise Exception style (PEP8)

This commit is contained in:
Miroslav Stampar
2013-01-03 23:20:55 +01:00
parent 3a11d36c66
commit e4a3c015e5
78 changed files with 260 additions and 260 deletions

View File

@@ -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()