Skip to content

Commit

Permalink
[Change] rawapi will return raw result if no "body" found #89
Browse files Browse the repository at this point in the history
  • Loading branch information
philippelt committed Nov 4, 2024
1 parent 5fb0a81 commit 47bc528
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lnetatmo.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ def rawAPI(authData, url, parameters=None):
if parameters is None: parameters = {}
parameters["access_token"] = authData.accessToken
resp = postRequest("rawAPI", fullUrl, parameters)
return resp["body"] if "body" in resp else None
return resp["body"] if "body" in resp else resp

def filter_home_data(rawData, home):
if home:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name='lnetatmo',
version='4.1.4',
version='4.1.5',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
Expand All @@ -17,7 +17,7 @@
scripts=[],
data_files=[],
url='https://github.com/philippelt/netatmo-api-python',
download_url='https://github.com/philippelt/netatmo-api-python/archive/v4.1.4.tar.gz',
download_url='https://github.com/philippelt/netatmo-api-python/archive/v4.1.5.tar.gz',
license='GPL V3',
description='Simple API to access Netatmo weather station data from any python script.'
)

1 comment on commit 47bc528

@JurgenLB
Copy link
Contributor

@JurgenLB JurgenLB commented on 47bc528 Nov 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason you make this change?
because;
self.rawData = resp['body']['home']
if not self.rawData : raise NoHome("No home %s found" % home)

this is used with some variations multiple times

Edit; Sorry I did not notice #89

Please sign in to comment.