Fixed aenter
This commit is contained in:
parent
6cd0d267d1
commit
6047e0aed7
3
.gitignore
vendored
3
.gitignore
vendored
@ -4,4 +4,5 @@ logs/*
|
||||
*.log
|
||||
.log.
|
||||
*.egg-info
|
||||
dist/
|
||||
dist/
|
||||
zones/
|
||||
|
@ -5,7 +5,7 @@
|
||||
from .client import CZDS
|
||||
|
||||
|
||||
__version__ = '1.2.5'
|
||||
__version__ = '1.2.6'
|
||||
__author__ = 'acidvegas'
|
||||
__email__ = 'acid.vegas@acid.vegas'
|
||||
__github__ = 'https://github.com/acidvegas/czds'
|
@ -40,6 +40,14 @@ class CZDS:
|
||||
|
||||
logging.info('Initialized CZDS client')
|
||||
|
||||
async def __aenter__(self):
|
||||
'''Async context manager entry'''
|
||||
await self.authenticate()
|
||||
return self
|
||||
|
||||
async def __aexit__(self, exc_type, exc_val, exc_tb):
|
||||
'''Async context manager exit'''
|
||||
await self.close()
|
||||
|
||||
async def close(self):
|
||||
'''Close the client session'''
|
||||
|
Loading…
Reference in New Issue
Block a user