diff --git a/allyAPI.py b/allyAPI.py index a2d172e7..8cab3731 100644 --- a/allyAPI.py +++ b/allyAPI.py @@ -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: @@ -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(":")): diff --git a/autoRSA.py b/autoRSA.py index 857f05c8..c2137e4e 100644 --- a/autoRSA.py +++ b/autoRSA.py @@ -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 diff --git a/helperAPI.py b/helperAPI.py index 1153be76..ed06f278 100644 --- a/helperAPI.py +++ b/helperAPI.py @@ -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: