calculate log line only if really logging
This commit is contained in:
parent
10cf2ce853
commit
a063680d32
@ -103,10 +103,8 @@ def log_results(results):
|
||||
result = results['result']
|
||||
profit = results['total_profit']
|
||||
|
||||
outcome = '{:5d}/{}: {}'.format(current_try, total_tries, result)
|
||||
|
||||
if profit >= TOTAL_PROFIT_TO_BEAT:
|
||||
logger.info(outcome)
|
||||
logger.info('{:5d}/{}: {}'.format(current_try, total_tries, result))
|
||||
else:
|
||||
print('.', end='')
|
||||
sys.stdout.flush()
|
||||
|
Loading…
Reference in New Issue
Block a user