python-selve-new 2.0.38__tar.gz → 2.0.39__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.
Files changed (32) hide show
  1. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/PKG-INFO +1 -1
  2. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/python_selve_new.egg-info/PKG-INFO +1 -1
  3. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/__init__.py +9 -1
  4. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/setup.py +1 -1
  5. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/LICENSE +0 -0
  6. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/README.md +0 -0
  7. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/python_selve_new.egg-info/SOURCES.txt +0 -0
  8. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/python_selve_new.egg-info/dependency_links.txt +0 -0
  9. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/python_selve_new.egg-info/requires.txt +0 -0
  10. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/python_selve_new.egg-info/top_level.txt +0 -0
  11. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/commands/__init__.py +0 -0
  12. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/commands/command.py +0 -0
  13. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/commands/device.py +0 -0
  14. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/commands/event.py +0 -0
  15. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/commands/group.py +0 -0
  16. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/commands/iveo.py +0 -0
  17. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/commands/param.py +0 -0
  18. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/commands/senSim.py +0 -0
  19. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/commands/sender.py +0 -0
  20. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/commands/sensor.py +0 -0
  21. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/commands/service.py +0 -0
  22. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/device.py +0 -0
  23. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/gateway.py +0 -0
  24. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/group.py +0 -0
  25. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/iveo.py +0 -0
  26. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/senSim.py +0 -0
  27. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/sender.py +0 -0
  28. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/sensor.py +0 -0
  29. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/util/__init__.py +0 -0
  30. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/util/errors.py +0 -0
  31. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/selve/util/protocol.py +0 -0
  32. {python-selve-new-2.0.38 → python-selve-new-2.0.39}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-selve-new
3
- Version: 2.0.38
3
+ Version: 2.0.39
4
4
  Summary: Python library for interfacing with selve devices using the USB-RF controller. Written completely new.
5
5
  Home-page: https://github.com/Kannix2005/python-selve-new
6
6
  Author: Stefan Altheimer
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-selve-new
3
- Version: 2.0.38
3
+ Version: 2.0.39
4
4
  Summary: Python library for interfacing with selve devices using the USB-RF controller. Written completely new.
5
5
  Home-page: https://github.com/Kannix2005/python-selve-new
6
6
  Author: Stefan Altheimer
@@ -238,6 +238,10 @@ class Selve:
238
238
  xmlstr = str(xmlstr).replace('<?xml version="1.0"? encoding="UTF-8">', '<?xml version="1.0" encoding="UTF-8"?>')
239
239
  try:
240
240
  res = untangle.parse(xmlstr)
241
+ except Exception as e:
242
+ self._LOGGER.error("Error in XML: " + str(e) + " : " + xmlstr)
243
+ return False
244
+ try:
241
245
  if not hasattr(res, 'methodResponse') and not hasattr(res, 'methodCall'):
242
246
  self._LOGGER.error("Bad response format")
243
247
  return None
@@ -248,6 +252,10 @@ class Selve:
248
252
  response = self.create_response(res)
249
253
  else:
250
254
  response = self.create_response_call(res)
255
+ except Exception as e:
256
+ self._LOGGER.error("Error in response creation: " + str(e) + " : " + xmlstr)
257
+ return False
258
+ try:
251
259
  # if it's a MethodResponse, it has not been sent by the gateway itself, so we can safely return it
252
260
  # otherwise it's an event, and we have to process it accordingly
253
261
  if isinstance(response, CommeoDeviceEventResponse) \
@@ -266,7 +274,7 @@ class Selve:
266
274
  return response
267
275
 
268
276
  except Exception as e:
269
- self._LOGGER.error("Error in XML: " + str(e) + " : " + xmlstr)
277
+ self._LOGGER.error("Error in response processing: " + str(e) + " : " + xmlstr)
270
278
  return False
271
279
 
272
280
  def create_error(self, obj):
@@ -15,7 +15,7 @@ with open(path.join(here, 'README.md'), encoding='utf-8') as f:
15
15
  setup(
16
16
 
17
17
  name='python-selve-new', # Required
18
- version='2.0.38', # Required
18
+ version='2.0.39', # Required
19
19
  description='Python library for interfacing with selve devices using the USB-RF controller. Written completely new.', # Required
20
20
  long_description=long_description, # Optional
21
21
  long_description_content_type="text/markdown",