uiprotect 2.1.0__py3-none-any.whl → 2.2.0__py3-none-any.whl

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.

uiprotect/websocket.py CHANGED
@@ -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:
@@ -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
@@ -29,9 +29,9 @@ uiprotect/stream.py,sha256=McV3XymKyjn-1uV5jdQHcpaDjqLS4zWyMASQ8ubcyb4,4924
29
29
  uiprotect/test_util/__init__.py,sha256=whiOUb5LfDLNT3AQG6ISiKtAqO2JnhCIdFavhWDK46M,18718
30
30
  uiprotect/test_util/anonymize.py,sha256=f-8ijU-_y9r-uAbhIPn0f0I6hzJpAkvJzc8UpWihObI,8478
31
31
  uiprotect/utils.py,sha256=3SJFF8qs1Jz8t3mD8qwc1hFSocolFjdXI_v4yVlC7o4,20088
32
- uiprotect/websocket.py,sha256=qVx2ZXOacnvyipiPy76i19Rpu596hFxGHhYWuMJVOtg,6898
33
- uiprotect-2.1.0.dist-info/LICENSE,sha256=INx18jhdbVXMEiiBANeKEbrbz57ckgzxk5uutmmcxGk,1111
34
- uiprotect-2.1.0.dist-info/METADATA,sha256=2ObhpC8nRihfVKuDZlBYh84HQX93a9FkHPRswCTcn44,10982
35
- uiprotect-2.1.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
36
- uiprotect-2.1.0.dist-info/entry_points.txt,sha256=J78AUTPrTTxgI3s7SVgrmGqDP7piX2wuuEORzhDdVRA,47
37
- uiprotect-2.1.0.dist-info/RECORD,,
32
+ uiprotect/websocket.py,sha256=Ufm1WLOeKCffXvSl8pWT11Q_t8tNpGHZWgeAL7Ao4mc,6799
33
+ uiprotect-2.2.0.dist-info/LICENSE,sha256=INx18jhdbVXMEiiBANeKEbrbz57ckgzxk5uutmmcxGk,1111
34
+ uiprotect-2.2.0.dist-info/METADATA,sha256=8TmCakZrF5cw4pKa7xLQzt-fyQFDMDKp1iCl4zUNl04,10982
35
+ uiprotect-2.2.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
36
+ uiprotect-2.2.0.dist-info/entry_points.txt,sha256=J78AUTPrTTxgI3s7SVgrmGqDP7piX2wuuEORzhDdVRA,47
37
+ uiprotect-2.2.0.dist-info/RECORD,,