@@ -451,7 +451,7 @@ def readInput(message, default=None):
451451 message += "\n > "
452452
453453 if conf .batch and default :
454- infoMsg = "%s%s" % (message , str (default ))
454+ infoMsg = "%s%s" % (message , unicode (default ))
455455 logger .info (infoMsg )
456456
457457 debugMsg = "used the default behaviour, running in batch mode"
@@ -517,7 +517,7 @@ def sanitizeStr(inpStr):
517517 @rtype: C{str}
518518 """
519519
520- cleanString = str (inpStr )
520+ cleanString = unicode (inpStr )
521521 cleanString = cleanString .replace ("\n " , " " ).replace ("\r " , "" )
522522
523523 return cleanString
@@ -638,8 +638,8 @@ def parseTargetDirect():
638638 conf .dbmsUser = details .group ('user' )
639639 conf .dbmsPass = details .group ('pass' )
640640 else :
641- conf .dbmsUser = str ()
642- conf .dbmsPass = str ()
641+ conf .dbmsUser = unicode ()
642+ conf .dbmsPass = unicode ()
643643
644644 if not conf .dbmsPass :
645645 conf .dbmsPass = None
@@ -1032,7 +1032,7 @@ def safeStringFormat(formatStr, params):
10321032
10331033 if index != - 1 :
10341034 if count < len (params ):
1035- retVal = retVal [:index ] + str (params [count ]) + retVal [index + 2 :]
1035+ retVal = retVal [:index ] + unicode (params [count ]) + retVal [index + 2 :]
10361036 else :
10371037 raise sqlmapNoneDataException , "wrong number of parameters during string formatting"
10381038 count += 1
@@ -1107,7 +1107,7 @@ def profile(profileOutputFile=None, dotOutputFile=None, imageOutputFile=None):
11071107 import gtk
11081108 import pydot
11091109 except ImportError , e :
1110- errMsg = "profiling requires third-party libraries (%s)" % str (e )
1110+ errMsg = "profiling requires third-party libraries (%s)" % unicode (e )
11111111 logger .error (errMsg )
11121112 return
11131113
@@ -1343,7 +1343,7 @@ def getCommonStart(strings=[]):
13431343 if len (strings ) == 1 :
13441344 return strings [0 ]
13451345
1346- retVal = str ()
1346+ retVal = unicode ()
13471347 maxCount = min (len (string ) for string in strings )
13481348
13491349 count = 0
0 commit comments