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

@@ -35,7 +35,7 @@ class Connector(GenericConnector):
if not IS_WIN:
errMsg = "currently, direct connection to Microsoft Access database(s) "
errMsg += "is restricted to Windows platforms"
raise SqlmapUnsupportedFeatureException, errMsg
raise SqlmapUnsupportedFeatureException(errMsg)
self.initConnection()
self.checkFileDb()
@@ -43,7 +43,7 @@ class Connector(GenericConnector):
try:
self.connector = pyodbc.connect('Driver={Microsoft Access Driver (*.mdb)};Dbq=%s;Uid=Admin;Pwd=;' % self.db)
except (pyodbc.Error, pyodbc.OperationalError), msg:
raise SqlmapConnectionException, msg[1]
raise SqlmapConnectionException(msg[1])
self.setCursor()
self.connected()
@@ -61,7 +61,7 @@ class Connector(GenericConnector):
except (pyodbc.OperationalError, pyodbc.ProgrammingError), msg:
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % msg[1])
except pyodbc.Error, msg:
raise SqlmapConnectionException, msg[1]
raise SqlmapConnectionException(msg[1])
self.connector.commit()