From c77d8aaac8933699f4ac3ae0e27e19199a10bb35 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 6 Feb 2019 22:36:25 +0000 Subject: Default `error` to `""`, `_client_first`/`_salted_password`/`_auth_message` to `b""` (sasl.scram) --- modules/sasl/scram.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/sasl/scram.py b/modules/sasl/scram.py index ffe5a9f0..a8760182 100644 --- a/modules/sasl/scram.py +++ b/modules/sasl/scram.py @@ -36,11 +36,11 @@ class SCRAM(object): self._password = password.encode("utf8") self.state = SCRAMState.Uninitialised - self.error = None # typing.Optional[str] + self.error = "" - self._client_first = None # typing.Optional[bytes] - self._salted_password = None # typing.Optional[bytes] - self._auth_message = None # typing.Optional[bytes] + self._client_first = b"" + self._salted_password = b"" + self._auth_message = b"" def _get_pieces(self, data: bytes) -> typing.Dict[bytes, bytes]: pieces = (piece.split(b"=", 1) for piece in data.split(b",")) -- cgit v1.3.1-10-gc9f91