ansible / ansible-container

DEPRECATED -- Ansible Container was a tool to build Docker images and orchestrate containers using only Ansible playbooks.
GNU Lesser General Public License v3.0
2.19k stars 392 forks source link

Handle filenames with unicode characters #922

Closed voondo closed 6 years ago

voondo commented 6 years ago

exception was:

Traceback (most recent call last):
  File "/usr/bin/conductor", line 11, in <module>
    load_entry_point('ansible-container', 'console_scripts', 'conductor')()
  File "/_ansible/container/__init__.py", line 19, in __wrapped__
    return fn(*args, **kwargs)
  File "/_ansible/container/cli.py", line 423, in conductor_commandline
    **params)
  File "/_ansible/container/__init__.py", line 19, in __wrapped__
    return fn(*args, **kwargs)
  File "/_ansible/container/core.py", line 809, in conductorcmd_build
    role_fingerprint = get_role_fingerprint(role, service_name, config_vars)
  File "/_ansible/container/__init__.py", line 19, in __wrapped__
    return fn(*args, **kwargs)
  File "/_ansible/container/utils/__init__.py", line 322, in get_role_fingerprint
    hash_role(hash_obj, resolve_role_to_path(role))
  File "/_ansible/container/utils/__init__.py", line 308, in hash_role
    hash_dir(hash_obj, src)
  File "/_ansible/container/utils/__init__.py", line 275, in hash_dir
    hash_obj.update(abs_file_path)
UnicodeEncodeError: 'ascii' codec can't encode character u'\x93' in position 56: ordinal not in range(128)
ISSUE TYPE
gregdek commented 6 years ago

@voondo thanks for this PR, sorry we didn't get to it sooner, subsequently closed by #939.