Skip to content

Commit bd2b862

Browse files
authored
Fix init
1 parent b48ba8a commit bd2b862

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

aioworkers_aiohttp/server.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ def set_port(cls, port: int) -> None:
1111
cls.port = port
1212

1313
def __init__(self, *args, **kwargs):
14-
super().__init__(*args, **kwargs)
1514
self._runner = None
1615
self._kwargs = {}
16+
super().__init__(*args, **kwargs)
1717

1818
def set_config(self, config):
1919
if self.port:
@@ -27,11 +27,11 @@ def set_config(self, config):
2727
async def init(self):
2828
access_log_format = self.config.get('access_log.format')
2929
if not access_log_format:
30-
cfg = self.context.config.logging
31-
for i in 'formatters.access'.split('.'):
30+
cfg = self.context.config
31+
for i in 'logging.formatters.access'.split('.'):
3232
if not cfg:
3333
break
34-
cfg = cfg.get(i)
34+
cfg = cfg.get(i, {})
3535
else:
3636
access_log_format = cfg.get('format')
3737
if access_log_format:

0 commit comments

Comments
 (0)