some refactoring

This commit is contained in:
Miroslav Stampar
2011-12-28 16:27:17 +00:00
parent 37d78ffe01
commit 29f502fe29
8 changed files with 25 additions and 47 deletions

View File

@@ -173,9 +173,7 @@ def __errorFields(expression, expressionFields, expressionFieldsList, expected=N
return None
if output is not None:
kb.locks.ioLock.acquire()
dataToStdout("[%s] [INFO] %s: %s\r\n" % (time.strftime("%X"), "resumed" if threadData.resumed else "retrieved", safecharencode(output)))
kb.locks.ioLock.release()
if isinstance(num, int):
expression = origExpr
@@ -347,10 +345,6 @@ def errorUse(expression, expected=None, resumeValue=True, dump=False):
debugMsg += "large number of rows. It might take too long"
logger.debug(debugMsg)
lockNames = ('limits', 'outputs')
for lock in lockNames:
kb.locks[lock] = threading.Lock()
try:
def errorThread():
threadData = getCurrentThreadData()