mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-01-09 06:17:08 +00:00
Fix local_nonce None
This commit is contained in:
parent
6bfb19a748
commit
aba71744ca
@ -8,7 +8,6 @@ import hashlib
|
|||||||
import logging
|
import logging
|
||||||
import secrets
|
import secrets
|
||||||
import ssl
|
import ssl
|
||||||
import uuid
|
|
||||||
from enum import Enum, auto
|
from enum import Enum, auto
|
||||||
from typing import TYPE_CHECKING, Any, cast
|
from typing import TYPE_CHECKING, Any, cast
|
||||||
|
|
||||||
@ -492,8 +491,8 @@ class SslAesTransport(BaseTransport):
|
|||||||
async def perform_handshake1(self) -> tuple[str, str, str] | None:
|
async def perform_handshake1(self) -> tuple[str, str, str] | None:
|
||||||
"""Perform the handshake1."""
|
"""Perform the handshake1."""
|
||||||
resp_dict = None
|
resp_dict = None
|
||||||
|
local_nonce = secrets.token_bytes(8).hex().upper()
|
||||||
if self._username:
|
if self._username:
|
||||||
local_nonce = secrets.token_bytes(8).hex().upper()
|
|
||||||
resp_dict = await self.try_send_handshake1(self._username, local_nonce)
|
resp_dict = await self.try_send_handshake1(self._username, local_nonce)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
Loading…
Reference in New Issue
Block a user