If you create a SessionState that doesn't know about any job and the call .update_desired_job_list() with some sample job
then the DependencySolver will crash on KeyError.
According to the docstring of the update_desired_job_list() that should never happen.
Traceback (most recent call last):
File "./run.py", line 30, in <module>
main()
File "./run.py", line 25, in main
res = run_job(job)
File "/home/zyga/checkbox-touch/checkbox-touch/py/checkbox_touch.py", line 291, in run_job
session_mgr.state.update_desired_job_list([get_job(job_id)])
File "/usr/lib/python3/dist-packages/plainbox/impl/session/state.py", line 437, in update_desired_job_list
self._job_list, self._desired_job_list)
File "/usr/lib/python3/dist-packages/plainbox/impl/depmgr.py", line 214, in resolve_dependencies
return cls(job_list)._solve(visit_list)
File "/usr/lib/python3/dist-packages/plainbox/impl/depmgr.py", line 247, in _solve
self._visit(job)
File "/usr/lib/python3/dist-packages/plainbox/impl/depmgr.py", line 261, in _visit
color = self._job_color_map[job.id]
KeyError: '2013.com.canonical.certification::__expresscard__'