mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 05:01:30 +00:00
Replacing old and deprecated raise Exception style (PEP8)
This commit is contained in:
@@ -44,7 +44,7 @@ class Google(object):
|
||||
e.info()
|
||||
except urllib2.URLError:
|
||||
errMsg = "unable to connect to Google"
|
||||
raise SqlmapConnectionException, errMsg
|
||||
raise SqlmapConnectionException(errMsg)
|
||||
|
||||
def search(self, dork):
|
||||
"""
|
||||
@@ -94,13 +94,13 @@ class Google(object):
|
||||
return None
|
||||
except (urllib2.URLError, socket.error, socket.timeout):
|
||||
errMsg = "unable to connect to Google"
|
||||
raise SqlmapConnectionException, errMsg
|
||||
raise SqlmapConnectionException(errMsg)
|
||||
|
||||
retVal = [urllib.unquote(match.group(1)) for match in re.finditer(GOOGLE_REGEX, page, re.I | re.S)]
|
||||
|
||||
if not retVal and "detected unusual traffic" in page:
|
||||
warnMsg = "Google has detected 'unusual' traffic from "
|
||||
warnMsg += "this computer disabling further searches"
|
||||
raise SqlmapGenericException, warnMsg
|
||||
raise SqlmapGenericException(warnMsg)
|
||||
|
||||
return retVal
|
||||
|
||||
Reference in New Issue
Block a user