diff --git a/src/bqapi/comm.py b/src/bqapi/comm.py index fd9034e..3e7f6c1 100644 --- a/src/bqapi/comm.py +++ b/src/bqapi/comm.py @@ -376,7 +376,7 @@ def init(self, bisque_url, credentials=None, moduleuri=None, create_mex=False): auth_service = self.service("auth_service") logins = auth_service.login_providers(render="xml") login_type = None - if logins is not None and logins[0]: + if logins is not None and len(logins) > 0: login_type = logins[0].get("type") if login_type == "cas": return self.init_cas(