From 60ad4e9ca34e12a29de76170a8b6ca746742a174 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sat, 7 Jan 2017 20:10:59 +0100 Subject: [PATCH] backend: Do not assume that all command arguments are (byte)strings --- tasklib/backends.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasklib/backends.py b/tasklib/backends.py index 4b0c6df..e6daace 100644 --- a/tasklib/backends.py +++ b/tasklib/backends.py @@ -132,7 +132,10 @@ 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([x.decode('utf-8') for x in args]) + command_args.extend([ + x.decode('utf-8') if isinstance(x, six.binary_type) + else six.text_type(x) for x in args + ]) return command_args def _get_version(self): -- 2.39.5