From: Tomas Babej Date: Sat, 7 Jan 2017 18:26:25 +0000 (+0100) Subject: backend: Support utf-8 command line arguments X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/96a5360582493699cf77a1a0b65aa83e42bb1743?hp=--cc backend: Support utf-8 command line arguments --- 96a5360582493699cf77a1a0b65aa83e42bb1743 diff --git a/tasklib/backends.py b/tasklib/backends.py index fd3069c..440cfe4 100644 --- a/tasklib/backends.py +++ b/tasklib/backends.py @@ -132,7 +132,7 @@ class TaskWarrior(Backend): 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)) + command_args.extend([x.decode('utf-8') for x in args]) return command_args def _get_version(self): @@ -264,7 +264,8 @@ class TaskWarrior(Backend): return_all=False): command_args = self._get_command_args( args, config_override=config_override) - logger.debug(' '.join(command_args)) + logger.debug(u' '.join(command_args)) + p = subprocess.Popen(command_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = [x.decode('utf-8') for x in p.communicate()]