Skip to content

Commit 5451a19

Browse files
authored
Update __init__.py
1 parent 3d330cf commit 5451a19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymyq/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def get_status(self, device_id):
175175
garage_state = False
176176

177177
get_status_attempt = 0
178-
while get_status_attempt < 3:
178+
for get_status_attempt in range(0, 2):
179179
try:
180180
doorstate = requests.get(
181181
'https://{host_uri}/{device_attribute_get_endpoint}'.format(
@@ -192,7 +192,7 @@ def get_status(self, device_id):
192192
)
193193

194194
doorstate.raise_for_status()
195-
get_status_attempt = 3
195+
break
196196

197197
except requests.exceptions.HTTPError as ex:
198198
get_status_attempt = get_status_attempt + 1

0 commit comments

Comments
 (0)