Dealing with deprecated raises

This commit is contained in:
Miroslav Stampar
2018-03-13 11:13:38 +01:00
parent 1d9c11b1c1
commit ae2b02952f
15 changed files with 46 additions and 50 deletions

View File

@@ -46,7 +46,7 @@ class SQLAlchemy(GenericConnector):
try:
if not self.port and self.db:
if not os.path.exists(self.db):
raise SqlmapFilePathException, "the provided database file '%s' does not exist" % self.db
raise SqlmapFilePathException("the provided database file '%s' does not exist" % self.db)
_ = conf.direct.split("//", 1)
conf.direct = "%s////%s" % (_[0], os.path.abspath(self.db))