diff options
Diffstat (limited to 'distbuild')
-rw-r--r-- | distbuild/build_controller.py | 3 | ||||
-rw-r--r-- | distbuild/mainloop.py | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/distbuild/build_controller.py b/distbuild/build_controller.py index e38b25b7..0a3bd8a8 100644 --- a/distbuild/build_controller.py +++ b/distbuild/build_controller.py @@ -296,7 +296,8 @@ class BuildController(distbuild.StateMachine): def _request_command_execution(self, argv, request_id): '''Tell the controller's distbuild-helper to run a command.''' - if self.mainloop.n_state_machines_of_type(distbuild.HelperRouter) == 0: + hrs = self.mainloop.state_machines_of_type(distbuild.HelperRouter) + if len(hrs) == 0: self.fail('No distbuild-helper process running on controller!') msg = distbuild.message('exec-request', diff --git a/distbuild/mainloop.py b/distbuild/mainloop.py index 4d5a2b61..34fd3b4f 100644 --- a/distbuild/mainloop.py +++ b/distbuild/mainloop.py @@ -61,9 +61,6 @@ class MainLoop(object): def state_machines_of_type(self, machine_type): return [m for m in self._machines if isinstance(m, machine_type)] - def n_state_machines_of_type(self, machine_type): - return len(self.state_machines_of_type(machine_type)) - def add_event_source(self, event_source): logging.debug('MainLoop.add_event_source: %s' % event_source) self._sources.append(event_source) |