don't use context manager in web command

This commit is contained in:
Jens Langhammer 2019-04-11 14:22:32 +02:00
parent c90d8ddcff
commit 045a802365
2 changed files with 13 additions and 7 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
passbook (0.1.30) stable; urgency=medium
* bump version: 0.1.28-beta -> 0.1.29-beta
* don't use context manager in web command
-- Jens Langhammer <jens.langhammer@beryju.org> Thu, 11 Apr 2019 12:21:58 +0000
passbook (0.1.29) stable; urgency=medium
* bump version: 0.1.27-beta -> 0.1.28-beta

View File

@ -21,10 +21,9 @@ class Command(BaseCommand):
def daphne_server(self):
"""Run daphne server within autoreload"""
autoreload.raise_last_exception()
with CONFIG.cd('web'):
CommandLineInterface().run([
'-p', str(CONFIG.get('port', 8000)),
'-b', CONFIG.get('listen', '0.0.0.0'), # nosec
'--access-log', '/dev/null',
'passbook.core.asgi:application'
])
CommandLineInterface().run([
'-p', str(CONFIG.y('web.port', 8000)),
'-b', CONFIG.y('web.listen', '0.0.0.0'), # nosec
'--access-log', '/dev/null',
'passbook.core.asgi:application'
])