Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
codeskyblue committed Jul 20, 2024
1 parent f6e93b5 commit 59bbb0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions wda/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ def _unsafe_httpdo(url: str, method='GET', data=None, timeout=None):
response = fetch(url, method, data, timeout)
if response.status_code == 502: # Bad Gateway
raise WDABadGateway(response.status_code, response.text)

if DEBUG:
ms = (time.time() - start) * 1000
response_text = response.text
Expand Down Expand Up @@ -1581,7 +1580,7 @@ def _wda_req(self, method, url, data=None):
return self.http.fetch(method, '/wda/element/' + self._id + url, data)

def _prop(self, key):
return self._req('get', '/' + key.lstrip('/')).value
return self._req('GET', '/' + key.lstrip('/')).value

def _wda_prop(self, key):
ret = self.http.get('/wda/element/%s/%s' % (self._id, key)).value
Expand Down Expand Up @@ -1741,7 +1740,7 @@ def selected(self):
''' Element has been selected.
Returns: bool
'''
return self._req('get', '/selected').value
return self._req('GET', '/selected').value


class USBClient(Client):
Expand Down
1 change: 1 addition & 0 deletions wda/usbmux/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def fetch(url: str, method="GET", data=None, timeout=None) -> HTTPResponseWrappe
HTTPError
"""
try:
method = method.upper()
conn = http_create(url)
conn.timeout = timeout
u = urlparse(url)
Expand Down

0 comments on commit 59bbb0e

Please sign in to comment.