mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-03 22:31:34 +00:00
Replacing old and deprecated raise Exception style (PEP8)
This commit is contained in:
parent
3a11d36c66
commit
e4a3c015e5
78 changed files with 260 additions and 260 deletions
|
|
@ -56,12 +56,12 @@ class Connector(GenericConnector):
|
|||
except ImportError:
|
||||
errMsg = "sqlmap requires 'python-sqlite2' third-party library "
|
||||
errMsg += "in order to directly connect to the database '%s'" % self.db
|
||||
raise SqlmapMissingDependence, errMsg
|
||||
raise SqlmapMissingDependence(errMsg)
|
||||
|
||||
self.__sqlite = sqlite
|
||||
self.connector = self.__sqlite.connect(database=self.db, check_same_thread=False, timeout=conf.timeout)
|
||||
except (self.__sqlite.DatabaseError, self.__sqlite.OperationalError), msg:
|
||||
raise SqlmapConnectionException, msg[0]
|
||||
raise SqlmapConnectionException(msg[0])
|
||||
|
||||
self.setCursor()
|
||||
self.connected()
|
||||
|
|
@ -79,7 +79,7 @@ class Connector(GenericConnector):
|
|||
except self.__sqlite.OperationalError, msg:
|
||||
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % msg[0])
|
||||
except self.__sqlite.DatabaseError, msg:
|
||||
raise SqlmapConnectionException, msg[0]
|
||||
raise SqlmapConnectionException(msg[0])
|
||||
|
||||
self.connector.commit()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue