Fix setting backdoor port in service start

Previously if self.manager wasn't defined for a Service object but a
backdoor_port was specified then that particular service would not
start because it would try to set the backdoor port in an object that
didn't exist. This commit fixes setting the backdoor port only if
manager is defined when calling start().

Closes-Bug: #1243260

Change-Id: Ib0e709cfd0e299a3e010450b7eba6e92bc108e4e
(cherry picked from commit e5c96505c0)
This commit is contained in:
Matthew Treinish 2013-10-22 15:06:14 +00:00
parent d8e647742b
commit 65135e7025
1 changed files with 2 additions and 2 deletions

View File

@ -353,8 +353,8 @@ class WSGIService(object):
if self.manager:
self.manager.init_host()
self.manager.pre_start_hook()
if self.backdoor_port is not None:
self.manager.backdoor_port = self.backdoor_port
if self.backdoor_port is not None:
self.manager.backdoor_port = self.backdoor_port
self.server.start()
if self.manager:
self.manager.post_start_hook()