mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2026-04-06 06:43:54 +00:00
fix some not defined warnings
This commit is contained in:
parent
bb1a7f21f9
commit
543719a917
2 changed files with 17 additions and 7 deletions
15
bw_server.py
15
bw_server.py
|
|
@ -46,7 +46,6 @@ from boswatch.network.broadcast import BroadcastServer
|
|||
from boswatch.router.routerManager import RouterManager
|
||||
from boswatch.utils import misc
|
||||
|
||||
|
||||
header.logoToLog()
|
||||
header.infoToLog()
|
||||
|
||||
|
|
@ -67,8 +66,11 @@ if not bwConfig.loadConfigFile(paths.CONFIG_PATH + args.config):
|
|||
exit(1)
|
||||
|
||||
# ############################# begin server system
|
||||
try:
|
||||
bwRoutMan = None
|
||||
bwServer = None
|
||||
bcServer = None
|
||||
|
||||
try:
|
||||
bwRoutMan = RouterManager()
|
||||
if not bwRoutMan.buildRouter(bwConfig):
|
||||
logging.fatal("Error while building routers")
|
||||
|
|
@ -109,7 +111,10 @@ except: # pragma: no cover
|
|||
logging.exception("BOSWatch interrupted by an error")
|
||||
finally:
|
||||
logging.debug("Starting shutdown routine")
|
||||
del bwRoutMan
|
||||
bwServer.stop()
|
||||
bcServer.stop()
|
||||
if bwRoutMan:
|
||||
del bwRoutMan
|
||||
if bwServer:
|
||||
bwServer.stop()
|
||||
if bcServer:
|
||||
bcServer.stop()
|
||||
logging.debug("BOSWatch server has stopped ...")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue