Ihar Hrachyshka e0bf7767da daemon: avoid raising UnboundLocalError to callers
If something in the daemon_start() function fails before server variable
is initialized, we get the following exception:

UnboundLocalError: local variable 'server' referenced before assignment

We should not attempt to close connections or kill all threads for a
daemon that failed to start (or that hasn't even reached the moment of
the start).

Closes-Bug: #1465350
Change-Id: I7769e40c13e3bd740d5b8a949a61d1bcc127f137
2015-06-23 13:21:12 +02:00
..