uiprotect 2.1.0__tar.gz → 2.2.0__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.

Potentially problematic release.


This version of uiprotect might be problematic. Click here for more details.

Files changed (36) hide show
  1. {uiprotect-2.1.0 → uiprotect-2.2.0}/PKG-INFO +1 -1
  2. {uiprotect-2.1.0 → uiprotect-2.2.0}/pyproject.toml +1 -1
  3. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/websocket.py +7 -12
  4. {uiprotect-2.1.0 → uiprotect-2.2.0}/LICENSE +0 -0
  5. {uiprotect-2.1.0 → uiprotect-2.2.0}/README.md +0 -0
  6. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/__init__.py +0 -0
  7. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/__main__.py +0 -0
  8. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/api.py +0 -0
  9. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/cli/__init__.py +0 -0
  10. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/cli/backup.py +0 -0
  11. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/cli/base.py +0 -0
  12. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/cli/cameras.py +0 -0
  13. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/cli/chimes.py +0 -0
  14. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/cli/doorlocks.py +0 -0
  15. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/cli/events.py +0 -0
  16. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/cli/lights.py +0 -0
  17. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/cli/liveviews.py +0 -0
  18. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/cli/nvr.py +0 -0
  19. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/cli/sensors.py +0 -0
  20. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/cli/viewers.py +0 -0
  21. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/data/__init__.py +0 -0
  22. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/data/base.py +0 -0
  23. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/data/bootstrap.py +0 -0
  24. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/data/convert.py +0 -0
  25. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/data/devices.py +0 -0
  26. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/data/nvr.py +0 -0
  27. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/data/types.py +0 -0
  28. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/data/user.py +0 -0
  29. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/data/websocket.py +0 -0
  30. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/exceptions.py +0 -0
  31. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/py.typed +0 -0
  32. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/release_cache.json +0 -0
  33. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/stream.py +0 -0
  34. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/test_util/__init__.py +0 -0
  35. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/test_util/anonymize.py +0 -0
  36. {uiprotect-2.1.0 → uiprotect-2.2.0}/src/uiprotect/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: uiprotect
3
- Version: 2.1.0
3
+ Version: 2.2.0
4
4
  Summary: Python API for Unifi Protect (Unofficial)
5
5
  Home-page: https://github.com/uilibs/uiprotect
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "uiprotect"
3
- version = "2.1.0"
3
+ version = "2.2.0"
4
4
  description = "Python API for Unifi Protect (Unofficial)"
5
5
  authors = ["UI Protect Maintainers <ui@koston.org>"]
6
6
  license = "MIT"
@@ -76,28 +76,23 @@ class Websocket:
76
76
  level = logging.ERROR if self._seen_non_close_message else logging.DEBUG
77
77
  if isinstance(ex, WSServerHandshakeError):
78
78
  if ex.status == HTTPStatus.UNAUTHORIZED.value:
79
- _LOGGER.log(level, "Websocket authentication error: %s", url)
80
- await self._attempt_reauth()
81
- else:
82
79
  _LOGGER.log(
83
- level, "Websocket handshake error: %s", url, exc_info=True
80
+ level, "Websocket authentication error: %s: %s", url, ex
84
81
  )
82
+ await self._attempt_reauth()
83
+ else:
84
+ _LOGGER.log(level, "Websocket handshake error: %s: %s", url, ex)
85
85
  else:
86
- _LOGGER.log(
87
- level, "Websocket disconnect error: %s", url, exc_info=True
88
- )
86
+ _LOGGER.log(level, "Websocket disconnect error: %s: %s", url, ex)
89
87
  except asyncio.TimeoutError:
90
88
  level = logging.ERROR if self._seen_non_close_message else logging.DEBUG
91
89
  _LOGGER.log(level, "Websocket timeout: %s", url)
92
90
  except Exception:
93
- _LOGGER.debug(
94
- "Unexpected error in websocket reconnect loop, backoff: %s",
95
- backoff,
96
- exc_info=True,
97
- )
91
+ _LOGGER.exception("Unexpected error in websocket loop")
98
92
 
99
93
  if self._running is False:
100
94
  break
95
+ _LOGGER.debug("Reconnecting websocket in %s seconds", backoff)
101
96
  await asyncio.sleep(self.backoff)
102
97
 
103
98
  async def _websocket_inner_loop(self, url: URL) -> None:
File without changes
File without changes