From 52aa5c37e41ea3312093ad189690f5691fa51f3a Mon Sep 17 00:00:00 2001 From: khushal Date: Tue, 24 Dec 2024 15:08:57 +0530 Subject: [PATCH] (20241224) Exception handling. --- controllers_v2/finstitutions/trading/zerodha_kite.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers_v2/finstitutions/trading/zerodha_kite.py b/controllers_v2/finstitutions/trading/zerodha_kite.py index 6658441..e470f32 100644 --- a/controllers_v2/finstitutions/trading/zerodha_kite.py +++ b/controllers_v2/finstitutions/trading/zerodha_kite.py @@ -265,10 +265,10 @@ class ZerodhaKiteTradingController(TradingController): # Start by assuming failure: symbol_list = TradingSymbolListBrokerResponse() - try: + # Fit the token into the model: + zerodha_token = ZerodhaKiteAuthTokens(**auth_token.token) - # Fit the token into the model: - zerodha_token = ZerodhaKiteAuthTokens(**auth_token.token) + try: # Now create an instance of the Kite: kite = KiteConnect(api_key = auth_token.auth["apiKey"])