From b23ccf730f0a027bae3e1b50418daa8dbc5b8618 Mon Sep 17 00:00:00 2001 From: PUJA <52121207+krypton-byte@users.noreply.github.com> Date: Sun, 13 Nov 2022 23:48:18 +0700 Subject: [PATCH] fix: await protected --- xtempmail/aiomail.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xtempmail/aiomail.py b/xtempmail/aiomail.py index 1bfe5ed..3452af7 100644 --- a/xtempmail/aiomail.py +++ b/xtempmail/aiomail.py @@ -313,7 +313,7 @@ async def send_mail( }, files=tuple(files))).json()['result'] async def secret_address(self) -> Email: - if self.protected: + if await self.protected(): raise InvalidPIN() em, ex = (await self.get( 'https://tempmail.plus/api/box/hidden' @@ -329,7 +329,7 @@ async def protected(self) -> bool: return False async def Lock_Inbox(self, pin: str, duration_minutes: int = 60) -> bool: - if self.protected: + if await self.protected(): raise InvalidPIN() cp_params = self.params.copy() cp_params.update({ @@ -345,7 +345,7 @@ async def Lock_Inbox(self, pin: str, duration_minutes: int = 60) -> bool: return False async def Delete_Lock(self) -> bool: - if self.protected: + if await self.protected(): raise InvalidPIN() return await self.Lock_Inbox('', 0)