~larryprice/libertine/release-1.7.1

« back to all changes in this revision

Viewing changes to python/libertine/service/tasks/search_task.py

  • Committer: Larry Price
  • Date: 2017-03-14 17:40:27 UTC
  • mfrom: (94.260.43 devel)
  • Revision ID: larry.price@canonical.com-20170314174027-wc2bmjkr7he8jvuk
* Bump version to 1.7.1
* Gracefully handle creating a LibertineContainer object when the container
  backend is unavailable.
* Update libertine xmir components to not depend on container backends.
  (LP: #1671938)
* Catch all errors and gracefully shutdown libertined. (LP: #1671009)
* Fix method call from ContainerControl d-bus to interfaces.
* Update signal handlers in test_libertine_service to reflect new API.
* Inject client for accessing ContainerControl within containers.
* Rearchitect libertine service python backend for simpler access to running
  tasks. (LP: #1669091)
* Ignore completions from dependencies during snapcraft build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2016 Canonical Ltd.
 
1
# Copyright 2016-2017 Canonical Ltd.
2
2
#
3
3
# This program is free software: you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
18
18
 
19
19
 
20
20
class SearchTask(BaseTask):
21
 
    def __init__(self, container_id, cache, query, connection, callback):
22
 
        super().__init__(lock=None, container_id=container_id, config=None, connection=connection, callback=callback)
 
21
    def __init__(self, container_id, cache, query, monitor, callback):
 
22
        super().__init__(lock=None, container_id=container_id, config=None, monitor=monitor, callback=callback)
23
23
        self._cache = cache
24
24
        self._query = query
25
25
 
26
26
    def _run(self):
27
 
        self._progress.data(str(self._cache.search(self._query)))
 
27
        self._data(str(self._cache.search(self._query)))