Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
drewpearce committed Jan 11, 2018
1 parent d39799f commit 1c26870
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions legos/cryptocurrency.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ def __init__(self, baseplate, lock):
def listening_for(self, message):
if message['text'] is not None:
try:
return message['text'].split()[0] == '!crypto' or message['text'].split()[0] == '!hodl'
command = message['text'].split()[0]
return command == '!crypto' or command == '!hodl'
except Exception as e:
logger.error('''Stocks lego failed to check message text:
{}'''.format(e))
Expand Down Expand Up @@ -57,9 +58,11 @@ def _parse_multi_commands(self, message_list):
return case_dict[message_list[1]](message_list)

def _list_hodl_symbols(self, message_list):
fsyms = self.crypto_index['crypto_index']['fsyms']
tsyms = self.crypto_index['crypto_index']['tsyms']
return_val = ''
return_val += 'Convert From: ' + self.crypto_index['crypto_index']['fsyms'] + '\n'
return_val += 'Convert To: ' + self.crypto_index['crypto_index']['tsyms'] + '\n'
return_val += 'Convert From: ' + fsyms + '\n'
return_val += 'Convert To: ' + tsyms + '\n'
return return_val

def _add_symbols(self, message_list):
Expand Down

0 comments on commit 1c26870

Please sign in to comment.