From b971ebd343c71aed705eb7b5a576c28e6dc9dee0 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Wed, 16 Jan 2019 14:15:10 -0800 Subject: [PATCH] More path encoding fixes. --- lib/ansible/parsing/vault/__init__.py | 2 +- lib/ansible/plugins/action/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/parsing/vault/__init__.py b/lib/ansible/parsing/vault/__init__.py index 6022b5aa58e..8aca1cf217d 100644 --- a/lib/ansible/parsing/vault/__init__.py +++ b/lib/ansible/parsing/vault/__init__.py @@ -737,7 +737,7 @@ class VaultLib: file_slug = '' if filename: file_slug = ' of "%s"' % filename - display.vvvvv('Decrypt%s successful with secret=%s and vault_id=%s' % (file_slug, vault_secret, vault_secret_id)) + display.vvvvv('Decrypt%s successful with secret=%s and vault_id=%s' % (to_text(file_slug), vault_secret, vault_secret_id)) break except AnsibleVaultFormatError as exc: msg = "There was a vault format error" diff --git a/lib/ansible/plugins/action/__init__.py b/lib/ansible/plugins/action/__init__.py index ec91e8ac547..5b11f256db1 100644 --- a/lib/ansible/plugins/action/__init__.py +++ b/lib/ansible/plugins/action/__init__.py @@ -981,7 +981,7 @@ class ActionBase(with_metaclass(ABCMeta, object)): # Change directory to basedir of task for command execution when connection is local if self._connection.transport == 'local': cwd = os.getcwd() - os.chdir(self._loader.get_basedir()) + os.chdir(to_bytes(self._loader.get_basedir())) try: rc, stdout, stderr = self._connection.exec_command(cmd, in_data=in_data, sudoable=sudoable) finally: