~smoser/ubuntu/trusty/cloud-init/trusty-1461242

« back to all changes in this revision

Viewing changes to cloudinit/config/cc_ssh.py

  • Committer: Scott Moser
  • Date: 2015-09-10 16:49:33 UTC
  • Revision ID: smoser@ubuntu.com-20150910164933-lbqkwjkcq2ncwf1h
remove use of 'decode_binary'

there is no 'decode_binary' here.
the return values from subp in python2 are strings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
            with util.SeLinuxGuard("/etc/ssh", recursive=True):
99
99
                try:
100
100
                    out, err = util.subp(cmd, capture=True, env=lang_c)
101
 
                    sys.stdout.write(util.decode_binary(out))
 
101
                    sys.stdout.write(out)
102
102
                except util.ProcessExecutionError as e:
103
 
                    err = util.decode_binary(e.stderr).lower()
 
103
                    err = e.stderr.lower()
104
104
                    if (e.exit_code == 1 and
105
105
                            err.lower().startswith("unknown key")):
106
106
                        log.debug("ssh-keygen: unknown key type '%s'", keytype)