minor fix

This commit is contained in:
Miroslav Stampar
2012-06-15 06:22:44 +00:00
parent 76584ff0fa
commit 76c873a222
2 changed files with 3 additions and 3 deletions

View File

@@ -105,14 +105,14 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
else:
expressionUnescaped = unescaper.unescape(expression)
if length and not isinstance(length, int) and length.isdigit():
if length and isinstance(length, basestring) and length.isdigit():
length = int(length)
if length == 0:
return 0, ""
if lastChar > 0 and length > ( lastChar - firstChar ):
length = ( lastChar - firstChar )
length = lastChar - firstChar
showEta = conf.eta and isinstance(length, int)
numThreads = min(conf.threads, length)