X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/e81c1cd2f8bda4c8a6d1c29d75a6835a405a08b4..926c957fc04435bf2253a5748e5acec53a18ee86:/tasklib/task.py diff --git a/tasklib/task.py b/tasklib/task.py index b9cc447..8145e2e 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -225,7 +225,7 @@ class Task(TaskResource): # Create the TaskWarrior instance if none passed if backend is None: - backends = importlib.import_module('.backends') + backends = importlib.import_module('tasklib.backends') hook_parent_dir = os.path.dirname(os.path.dirname(sys.argv[0])) backend = backends.TaskWarrior(data_location=hook_parent_dir) @@ -425,7 +425,7 @@ class TaskQuerySet(object): Represents a lazy lookup for a task objects. """ - def __init__(self, backend=None, filter_obj=None): + def __init__(self, backend, filter_obj=None): self.backend = backend self._result_cache = None self.filter_obj = filter_obj or self.backend.filter_class(backend) @@ -434,7 +434,7 @@ class TaskQuerySet(object): """ Deep copy of a QuerySet doesn't populate the cache """ - obj = self.__class__() + obj = self.__class__(backend=self.backend) for k, v in self.__dict__.items(): if k in ('_iter', '_result_cache'): obj.__dict__[k] = None