X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/e1027fe29d12cbb32e50cf7927f13d5c4b0c8225..25491936a6c3ac31403ad3e6010e3f07413e239e:/tasklib/backends.py diff --git a/tasklib/backends.py b/tasklib/backends.py index fbe3ba3..b2038be 100644 --- a/tasklib/backends.py +++ b/tasklib/backends.py @@ -105,7 +105,7 @@ class TaskWarrior(Backend): self._config = None self.version = self._get_version() - self.config = { + self.overrides = { 'confirmation': 'no', 'dependency.confirmation': 'no', # See TW-1483 or taskrc man page 'recurrence.confirmation': 'no', # Necessary for modifying R tasks @@ -123,15 +123,15 @@ class TaskWarrior(Backend): data_location = os.path.expanduser(data_location) if create and not os.path.exists(data_location): os.makedirs(data_location) - self.config['data.location'] = data_location + self.overrides['data.location'] = data_location self.tasks = TaskQuerySet(self) def _get_command_args(self, args, config_override=None): command_args = ['task', 'rc:{0}'.format(self.taskrc_location)] - config = self.config.copy() - config.update(config_override or dict()) - for item in config.items(): + overrides = self.overrides.copy() + overrides.update(config_override or dict()) + for item in overrides.items(): command_args.append('rc.{0}={1}'.format(*item)) command_args.extend(map(six.text_type, args)) return command_args