Minor style update

This commit is contained in:
Miroslav Stampar 2013-01-02 21:52:50 +01:00
parent 0795760255
commit 09f1cdd8e1
2 changed files with 5 additions and 5 deletions

View File

@ -657,10 +657,10 @@ def getDirs():
return list(directories) return list(directories)
def filePathToString(filePath): def filePathToString(filePath):
strRepl = filePath.replace("/", "_").replace("\\", "_") retVal = filePath.replace("/", "_").replace("\\", "_")
strRepl = strRepl.replace(" ", "_").replace(":", "_") retVal = retVal.replace(" ", "_").replace(":", "_")
return strRepl return retVal
def singleTimeDebugMessage(message): def singleTimeDebugMessage(message):
singleTimeLogMessage(message, logging.DEBUG) singleTimeLogMessage(message, logging.DEBUG)
@ -832,7 +832,7 @@ def randomInt(length=4):
Returns random integer value with provided number of digits Returns random integer value with provided number of digits
""" """
return int("".join(random.choice(string.digits if i!=0 else string.digits.replace('0', '')) for i in xrange(0, length))) return int("".join(random.choice(string.digits if _ != 0 else string.digits.replace('0', '')) for _ in xrange(0, length)))
def randomStr(length=4, lowercase=False, alphabet=None): def randomStr(length=4, lowercase=False, alphabet=None):
""" """

View File

@ -686,7 +686,7 @@ def _setMetasploit():
if not msfEnvPathExists: if not msfEnvPathExists:
errMsg = "unable to locate Metasploit Framework installation. " errMsg = "unable to locate Metasploit Framework installation. "
errMsg += "Get it from http://metasploit.com/framework/download/" errMsg += "You can get it at 'http://metasploit.com/framework/download/'"
raise SqlmapFilePathException, errMsg raise SqlmapFilePathException, errMsg
def _setWriteFile(): def _setWriteFile():