mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-02-25 07:15:56 +08:00
Merge pull request #810 from smaarn/fix/shutdown-upon-keyboard-interruption-should-not-fail
fix: if authorizations check are required keyboard interruptions woul…
This commit is contained in:
commit
4ad3fbff74
1 changed files with 4 additions and 1 deletions
|
@ -205,6 +205,9 @@ def redirect_root():
|
||||||
@custom_auth_basic(check_credentials)
|
@custom_auth_basic(check_credentials)
|
||||||
def shutdown():
|
def shutdown():
|
||||||
authorize()
|
authorize()
|
||||||
|
doShutdown()
|
||||||
|
|
||||||
|
def doShutdown():
|
||||||
try:
|
try:
|
||||||
server.stop()
|
server.stop()
|
||||||
except:
|
except:
|
||||||
|
@ -2215,4 +2218,4 @@ try:
|
||||||
args.port) if args.port else str(settings.general.port)) + str(base_url))
|
args.port) if args.port else str(settings.general.port)) + str(base_url))
|
||||||
server.start()
|
server.start()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
shutdown()
|
doShutdown()
|
||||||
|
|
Loading…
Reference in a new issue