pyemoncms 0.0.4__tar.gz → 0.0.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyemoncms
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Summary: A python library to interrogate emoncms API
5
5
  Home-page: https://github.com/Open-Building-Management/pyemoncms
6
6
  Author: Alexandre CUER
@@ -74,9 +74,7 @@ class EmoncmsClient:
74
74
  try:
75
75
  if MESSAGE_KEY in json_response:
76
76
  data[MESSAGE_KEY] = json_response[MESSAGE_KEY]
77
- except TypeError as er:
78
- message = f"type error : {er}"
79
- self.logger.error(message)
77
+ except TypeError:
80
78
  data[SUCCESS_KEY] = False
81
79
  else:
82
80
  message = f"error {response.status}"
@@ -93,6 +91,10 @@ class EmoncmsClient:
93
91
  """
94
92
  uuid_data = await self.async_request("/user/getuuid.json")
95
93
  feed_data = await self.async_request("/feed/list.json")
94
+ if not uuid_data[SUCCESS_KEY]:
95
+ message = "no uuid available"
96
+ message = f"{message} - migrate your emoncms sensor to a newer version"
97
+ self.logger.warning(message)
96
98
  if feed_data[SUCCESS_KEY] and uuid_data[SUCCESS_KEY]:
97
99
  for feed in feed_data[MESSAGE_KEY]:
98
100
  feed["uuid"] = f"{uuid_data[MESSAGE_KEY]}_{feed['id']}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyemoncms
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Summary: A python library to interrogate emoncms API
5
5
  Home-page: https://github.com/Open-Building-Management/pyemoncms
6
6
  Author: Alexandre CUER
@@ -6,7 +6,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
6
6
 
7
7
  setuptools.setup(
8
8
  name="pyemoncms",
9
- version="0.0.4",
9
+ version="0.0.5",
10
10
  author="Alexandre CUER",
11
11
  author_email="alexandre.cuer@wanadoo.fr",
12
12
  description="A python library to interrogate emoncms API",
File without changes
File without changes
File without changes
File without changes