Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
arraylabs authored Oct 11, 2018
1 parent 3d330cf commit 5451a19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymyq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def get_status(self, device_id):
garage_state = False

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

doorstate.raise_for_status()
get_status_attempt = 3
break

except requests.exceptions.HTTPError as ex:
get_status_attempt = get_status_attempt + 1
Expand Down

0 comments on commit 5451a19

Please sign in to comment.