Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonDane committed Aug 8, 2023
1 parent 586aa26 commit e7eceb6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions allyAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def ally_init(ALLY_EXTERNAL=None, ALLY_ACCOUNT_NUMBERS_EXTERNAL=None):
params_list = []
for account in accounts:
account = account.split(":")
name = f"Ally {accounts.index(account) + 1}"
for nbr in account_nbrs_list:
for num in nbr.split(":"):
if len(account) != 4:
Expand All @@ -55,8 +56,6 @@ def ally_init(ALLY_EXTERNAL=None, ALLY_ACCOUNT_NUMBERS_EXTERNAL=None):
# Initialize Ally account
ally_obj = Brokerage("Ally")
for account in accounts:
index = accounts.index(account) + 1
name = f"Ally {index}"
print(f"Logging in to {name}...")
for nbr in account_nbrs_list:
for index, num in enumerate(nbr.split(":")):
Expand Down
2 changes: 1 addition & 1 deletion autoRSA.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def argParser(args: str):
orderObj.set_brokers(nicknames(broker))
elif arg == "all":
if "all" not in orderObj.get_brokers() and orderObj.get_brokers() == []:
orderObj.set_brokers = SUPPORTED_BROKERS
orderObj.set_brokers(SUPPORTED_BROKERS)
elif arg == "holdings":
orderObj.set_holdings(True)
# If first item of list is a stock, it must be a list of stocks
Expand Down
2 changes: 1 addition & 1 deletion helperAPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def set_price(self, price):

def set_brokers(self, brokers):
# Only allow strings or lists
if not isinstance(brokers, str) and not isinstance(brokers, list):
if not isinstance(brokers, (str, list)):
raise ValueError("Brokers must be a string or list")
if isinstance(brokers, list):
for b in brokers:
Expand Down

0 comments on commit e7eceb6

Please sign in to comment.