INNER CODE UNIT · Python

__aexit__

xinyitang3/cfnb · main.py:726

    async def __aexit__(self, exc_type, exc_val, exc_tb):
        if self.session:
            await self.session.close()

    @property
    def current_token(self):
        if self.current_token_index < len(self.token_list):
            return self.token_list[self.current_token_index]
        return None

    async def switch_token(self, silent=False):
        async with self.token_lock:
            if self.current_token_index + 1 < len(self.token_list):
                self.current_token_index += 1
                return True
            else:
                return False

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…