Skip to content

Commit 23b0fd6

Browse files
Fix authentication test flow. (#839)
1 parent 04c0507 commit 23b0fd6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

custom_components/bambu_lab/pybambu/bambu_cloud.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -372,11 +372,8 @@ def test_authentication(self, region: str, email: str, username: str, auth_token
372372
self._email = email
373373
self._username = username
374374
self._auth_token = auth_token
375-
try:
376-
self.get_device_list()
377-
except:
378-
return False
379-
return True
375+
result = self.get_device_list()
376+
return False if result is None else True
380377

381378
def login(self, region: str, email: str, password: str) -> str:
382379
self._region = region

0 commit comments

Comments
 (0)