remove unnecessary else statements

This commit is contained in:
Janne Sinivirta 2018-01-26 19:01:54 +02:00
parent 1eebbebed1
commit 67995a2f49

View File

@ -64,7 +64,7 @@ def process_maybe_execute_buy(interval):
# Create entity and execute trade
if create_trade(float(_CONF['stake_amount']), interval):
return True
else:
logger.info(
'Checked all whitelisted currencies. '
'Found no suitable entry positions for buying. Will keep looking ...'
@ -159,7 +159,7 @@ def handle_timedout_limit_buy(trade: Trade, order: Dict) -> bool:
rpc.send_msg('*Timeout:* Unfilled buy order for {} cancelled'.format(
trade.pair.replace('_', '/')))
return True
else:
# if trade is partially complete, edit the stake details for the trade
# and close the order
trade.amount = order['amount'] - order['remaining']
@ -189,7 +189,7 @@ def handle_timedout_limit_sell(trade: Trade, order: Dict) -> bool:
trade.pair.replace('_', '/')))
logger.info('Sell order timeout for %s.', trade)
return True
else:
# TODO: figure out how to handle partially complete sell orders
return False