def run_user_verify_job(self, job, config):
"""
@@ -464,14 +464,7 @@ class JobRunner(IJobRunner):
# Run the command
result_cmd = self._just_run_command(job, config)
# Maybe ask the user
- result_user = self._call_interaction_callback(job, config)
- # FIXME: result_user must never be None -- it is currently broken in
- # the existing service/highlevel code as emitAskForOutcomeSignal()
- # doesn't return anything.
- if result_user is not None:
- # Copy whatever user has decided over to the command result. This
- # way we preserve all logs and associated state.
- result_cmd.outcome = result_user.outcome
+ result_cmd.outcome = IJobResult.OUTCOME_UNDECIDED
return result_cmd
def run_user_interact_verify_job(self, job, config):
@@ -521,14 +514,7 @@ class JobRunner(IJobRunner):
# Run the command
result_cmd = self._just_run_command(job, config)
# Maybe ask the user
- result_user = self._call_interaction_callback(job, config)
- # FIXME: result_user must never be None -- it is currently broken in
- # the existing service/highlevel code as emitAskForOutcomeSignal()
- # doesn't return anything.
- if result_user is not None:
- # Copy whatever user has decided over to the command result. This
- # way we preserve all logs and associated state.
- result_cmd.outcome = result_user.outcome
+ result_cmd.outcome = IJobResult.OUTCOME_UNDECIDED
return result_cmd
This is broken by:
commit 4614cd7948b2478 6ea46dd21468d5d 45e00d5593
Author: Sylvain Pineau <email address hidden>
Date: Thu Oct 10 18:30:05 2013 +0200
plainbox: runner: Non automated jobs return OUTCOME_UNDECIDED
To let the client set the outcome, non automated jobs use this special
value to trigger the corresponding interaction.
The manual and user-interact plugins now return a MemoryJobResult OUTCOME_ UNDECIDED} ).
containing {'outcome': IJobResult.
The user-verify and user-interact- verify only alter the outcome of the
prerun command result, this way we preserve all logs and associated state.
diff --git a/plainbox/ plainbox/ impl/runner. py b/plainbox/ plainbox/ impl/runner. py plainbox/ impl/runner. py plainbox/ impl/runner. py IJobRunner) : interaction_ callback( job, config) ({'outcome' : IJobResult. OUTCOME_ UNDECIDED} )
index 91e1246..21e96dd 100644
--- a/plainbox/
+++ b/plainbox/
@@ -376,7 +376,7 @@ class JobRunner(
"""
if job.plugin != "manual":
raise ValueError("bad job plugin value")
- return self._call_
+ return MemoryJobResult
def run_user_ interact_ job(self, job, config): IJobRunner) : run_command( job, config) ({'outcome' : IJobResult. OUTCOME_ UNDECIDED} )
"""
@@ -416,7 +416,7 @@ class JobRunner(
"""
if job.plugin != "user-interact":
raise ValueError("bad job plugin value")
- return self._just_
+ return MemoryJobResult
def run_user_ verify_ job(self, job, config): IJobRunner) : run_command( job, config) interaction_ callback( job, config) meSignal( ) OUTCOME_ UNDECIDED
"""
@@ -464,14 +464,7 @@ class JobRunner(
# Run the command
result_cmd = self._just_
# Maybe ask the user
- result_user = self._call_
- # FIXME: result_user must never be None -- it is currently broken in
- # the existing service/highlevel code as emitAskForOutco
- # doesn't return anything.
- if result_user is not None:
- # Copy whatever user has decided over to the command result. This
- # way we preserve all logs and associated state.
- result_cmd.outcome = result_user.outcome
+ result_cmd.outcome = IJobResult.
return result_cmd
def run_user_ interact_ verify_ job(self, job, config): IJobRunner) : run_command( job, config) interaction_ callback( job, config) meSignal( ) OUTCOME_ UNDECIDED
@@ -521,14 +514,7 @@ class JobRunner(
# Run the command
result_cmd = self._just_
# Maybe ask the user
- result_user = self._call_
- # FIXME: result_user must never be None -- it is currently broken in
- # the existing service/highlevel code as emitAskForOutco
- # doesn't return anything.
- if result_user is not None:
- # Copy whatever user has decided over to the command result. This
- # way we preserve all logs and associated state.
- result_cmd.outcome = result_user.outcome
+ result_cmd.outcome = IJobResult.
return result_cmd
def _call_interacti on_callback( self, job, config):