Fix breakage caused by #27708

Fixes #29227
Refs #27708
This commit is contained in:
rallytime 2015-12-07 18:38:34 -07:00
parent 05ad93fd29
commit 75b6d5017b

View File

@ -1260,7 +1260,7 @@ def deploy_script(host,
)
if sudo:
comps = tmp_dir.lstrip('/').rstrip('/').split('/')
if comps and comps[0] != 'tmp':
if len(comps) > 1 or comps[0] != 'tmp':
ret = root_cmd(
'chown {0} \'{1}\''.format(username, tmp_dir),
tty, sudo, **ssh_kwargs