One more 2to3 baby step

This commit is contained in:
Miroslav Stampar
2019-01-22 02:29:52 +01:00
parent 7074365f8e
commit 2c270ed250
10 changed files with 20 additions and 20 deletions

View File

@@ -57,7 +57,7 @@ def dnsUse(payload, expression):
while True:
count += 1
prefix, suffix = ("%s" % randomStr(length=3, alphabet=DNS_BOUNDARIES_ALPHABET) for _ in xrange(2))
chunk_length = MAX_DNS_LABEL / 2 if Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.MYSQL, DBMS.PGSQL) else MAX_DNS_LABEL / 4 - 2
chunk_length = MAX_DNS_LABEL // 2 if Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.MYSQL, DBMS.PGSQL) else MAX_DNS_LABEL // 4 - 2
_, _, _, _, _, _, fieldToCastStr, _ = agent.getFields(expression)
nulledCastedField = agent.nullAndCastField(fieldToCastStr)
extendedField = re.search(r"[^ ,]*%s[^ ,]*" % re.escape(fieldToCastStr), expression).group(0)

View File

@@ -94,7 +94,7 @@ def _oneShotErrorUse(expression, field=None, chunkTest=False):
candidate = len(result) - len(kb.chars.stop)
current = candidate if candidate != current else current - 1
else:
current = current / 2
current = current // 2
if kb.errorChunkLength:
hashDBWrite(HASHDB_KEYS.KB_ERROR_CHUNK_LENGTH, kb.errorChunkLength)

View File

@@ -74,7 +74,7 @@ def _findUnionCharCount(comment, place, parameter, value, prefix, suffix, where=
highCols += ORDER_BY_STEP
else:
while not found:
mid = highCols - (highCols - lowCols) / 2
mid = highCols - (highCols - lowCols) // 2
if _orderByTest(mid):
lowCols = mid
else: