Skip to content
Snippets Groups Projects
Commit 008f880a authored by Sybren A. Stüvel's avatar Sybren A. Stüvel
Browse files

Fixed incompatibility with attrs version 17.1+.

parent 9d83e427
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,11 @@
This file logs the changes that are actually interesting to users (new features,
changed functionality, fixed bugs).
## Version 2.0.6 (in development)
- Fixed incompatibility with attrs version 17.1+.
## Version 2.0.5 (released 2017-05-09)
- Vacuum SQLite database at startup.
......
......@@ -36,9 +36,8 @@ class FlamencoManager:
async def patch(self, *args, loop, **kwargs) -> requests.Response:
return await self.client_request('PATCH', *args, loop=loop, **kwargs)
@functools.lru_cache(1)
def user_agent(self):
return 'Flamenco-Worker/%s' % self.flamenco_worker_version
def __attrs_post_init__(self):
self.user_agent = 'Flamenco-Worker/%s' % self.flamenco_worker_version
async def client_request(self, method, url, *,
params=None,
......@@ -83,7 +82,7 @@ class FlamencoManager:
if headers is None:
headers = {}
headers['User-Agent'] = self.user_agent()
headers['User-Agent'] = self.user_agent
http_req = partial(self.session.request,
method, abs_url,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment