Skip to content

Commit 183fb1f

Browse files
committed
[Fix] Missing header when using pyton 2.x
1 parent 4a3d2c8 commit 183fb1f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lnetatmo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ def postRequest(topic, url, params=None, timeout=10):
830830
params = urlencode(params)
831831
headers = {"Content-Type" : "application/x-www-form-urlencoded;charset=utf-8"}
832832
if token: headers["Authorization"] = "Bearer %s" % token
833-
req = urllib2.Request(url=url, data=params, headers=headers) if params else urllib2.Request(url)
833+
req = urllib2.Request(url=url, data=params, headers=headers) if params else urllib2.Request(url=url, headers=headers)
834834
try:
835835
resp = urllib2.urlopen(req, timeout=timeout)
836836
except urllib2.HTTPError as err:

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
setup(
66
name='lnetatmo',
7-
version='3.2.0',
7+
version='3.2.1',
88
classifiers=[
99
'Development Status :: 5 - Production/Stable',
1010
'Intended Audience :: Developers',
@@ -17,7 +17,7 @@
1717
scripts=[],
1818
data_files=[],
1919
url='https://github.com/philippelt/netatmo-api-python',
20-
download_url='https://github.com/philippelt/netatmo-api-python/archive/v3.2.0.tar.gz',
20+
download_url='https://github.com/philippelt/netatmo-api-python/archive/v3.2.1.tar.gz',
2121
license='GPL V3',
2222
description='Simple API to access Netatmo weather station data from any python script.'
2323
)

0 commit comments

Comments
 (0)