calculate log line only if really logging

This commit is contained in:
Janne Sinivirta 2017-12-22 16:55:20 +02:00
parent 10cf2ce853
commit a063680d32
1 changed files with 1 additions and 3 deletions

View File

@ -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()