Skip to content

Commit

Permalink
fix: await protected
Browse files Browse the repository at this point in the history
  • Loading branch information
krypton-byte committed Nov 13, 2022
1 parent 575f4e0 commit b23ccf7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xtempmail/aiomail.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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({
Expand All @@ -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)

Expand Down

0 comments on commit b23ccf7

Please sign in to comment.