Skip to content

Commit

Permalink
styling
Browse files Browse the repository at this point in the history
  • Loading branch information
starkillerOG committed Sep 12, 2023
1 parent 8715c95 commit 39a32ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions pynetgear/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,12 @@ def is_service_not_found_response(resp):
return (resp.status_code == 404 or
"<ResponseCode>404</ResponseCode>" in resp.text)


def is_incomplete_response(resp):
return (resp.status_code == 200 and
"<ResponseCode>" not in resp.text)


def convert(value, to_type, default=None):
"""Convert value to to_type, returns default if fails."""
if value in ["unknown", "<unknown>", "--"]:
Expand Down
4 changes: 2 additions & 2 deletions pynetgear/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def _try_request(
"Incomplete response to service '%s', method '%s', "
"<ResponseCode> missing: %s\n%s\n%s"
% (service,
method,
method,
response.status_code,
str(response.headers),
response.text)
Expand Down Expand Up @@ -578,7 +578,7 @@ def get_satellites(self):
node = self._get(
c.SERVICE_DEVICE_INFO,
c.GET_ALL_SATELLITES,
parseNode = ".//GetAllSatellitesResponse/CurrentSatellites",
parseNode=".//GetAllSatellitesResponse/CurrentSatellites",
return_node=True,
)

Expand Down

0 comments on commit 39a32ba

Please sign in to comment.