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

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