fix synchronize handling of encrypted hosts on delegation (#49460)

* Fix for #49363

* Replaced str() with to_text() as more python version safe

* Changed to comply to errors stragegy

(cherry picked from commit 64636d9de0)
This commit is contained in:
Andrey Che 2018-12-05 14:33:58 +08:00 committed by Toshio Kuratomi
parent 0dda61c258
commit 5b54472cfd

View file

@ -49,7 +49,7 @@ class ActionModule(ActionBase):
return path return path
def _host_is_ipv6_address(self, host): def _host_is_ipv6_address(self, host):
return ':' in host return ':' in to_text(host, errors='surrogate_or_strict')
def _format_rsync_rsh_target(self, host, path, user): def _format_rsync_rsh_target(self, host, path, user):
''' formats rsync rsh target, escaping ipv6 addresses if needed ''' ''' formats rsync rsh target, escaping ipv6 addresses if needed '''