Merge lp:~kissiel/checkbox/add-config-to-cbt into lp:checkbox

Proposed by Maciej Kisielewski
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 3578
Merged at revision: 3578
Proposed branch: lp:~kissiel/checkbox/add-config-to-cbt
Merge into: lp:checkbox
Diff against target: 36 lines (+4/-1)
1 file modified
checkbox-touch/py/checkbox_touch.py (+4/-1)
To merge this branch: bzr merge lp:~kissiel/checkbox/add-config-to-cbt
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Review via email: mp+249455@code.launchpad.net

Description of the change

This MR makes Checkbox-Touch keep PlainBoxConfig instance and use it when running job activities.

311fe1d checkbox-touch: use PlainBoxConfig when running jobs

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

+1, thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'checkbox-touch/py/checkbox_touch.py'
2--- checkbox-touch/py/checkbox_touch.py 2015-02-09 14:38:01 +0000
3+++ checkbox-touch/py/checkbox_touch.py 2015-02-12 08:37:20 +0000
4@@ -44,6 +44,7 @@
5
6 from plainbox.abc import IJobResult
7 from plainbox.i18n import gettext as _
8+from plainbox.impl.applogic import PlainBoxConfig
9 from plainbox.impl.clitools import ToolBase
10 from plainbox.impl.exporter import get_all_exporters
11 from plainbox.impl.providers.special import get_categories
12@@ -335,6 +336,7 @@
13 self.resume_candidate_storage = None
14 self.session_storage_repo = None
15 self.timestamp = datetime.datetime.utcnow().isoformat()
16+ self.config = None
17
18 def __repr__(self):
19 return "app"
20@@ -366,6 +368,7 @@
21 self.context.state.metadata.flags.add('bootstrapping')
22 # Checkpoint the session so that we have something to see
23 self._checkpoint()
24+ self.config = PlainBoxConfig()
25 self.runner = JobRunner(
26 self.manager.storage.location,
27 self.context.provider_list,
28@@ -642,7 +645,7 @@
29 self.context.state.running_job_name = job_id
30 self._checkpoint()
31 try:
32- result = self.runner.run_job(job, job_state)
33+ result = self.runner.run_job(job, job_state, self.config)
34 except OSError as exc:
35 result = self.context.state.job_state_map[job_id].result
36 result.outcome = 'fail'

Subscribers

People subscribed via source and target branches