Add contextmanager to Control module
This commit is contained in:
parent
5e94e6f453
commit
fb9f0e27aa
|
@ -12,6 +12,14 @@ class AntiCaptchaControl:
|
|||
"""
|
||||
self.ANTICAPTCHA_KEY = anticaptcha_key
|
||||
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type, exc_value, traceback):
|
||||
if exc_type:
|
||||
return False
|
||||
return True
|
||||
|
||||
def get_balance(self):
|
||||
'''
|
||||
Получение баланса аккаунта
|
||||
|
@ -44,6 +52,14 @@ class aioAntiCaptchaControl:
|
|||
"""
|
||||
self.ANTICAPTCHA_KEY = anticaptcha_key
|
||||
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type, exc_value, traceback):
|
||||
if exc_type:
|
||||
return False
|
||||
return True
|
||||
|
||||
async def get_balance(self):
|
||||
'''
|
||||
Получение баланса аккаунта
|
||||
|
|
Loading…
Reference in New Issue