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

« back to all changes in this revision

Viewing changes to debian/patches/lp-1461242-generate-ed25519-host-keys.patch

  • 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:
101
101
-                    util.logexc(log, "Failed generating key type %s to "
102
102
-                                "file %s", keytype, keyfile)
103
103
+                    out, err = util.subp(cmd, capture=True, env=lang_c)
104
 
+                    sys.stdout.write(util.decode_binary(out))
 
104
+                    sys.stdout.write(out)
105
105
+                except util.ProcessExecutionError as e:
106
 
+                    err = util.decode_binary(e.stderr).lower()
 
106
+                    err = e.stderr.lower()
107
107
+                    if (e.exit_code == 1 and
108
108
+                            err.lower().startswith("unknown key")):
109
109
+                        log.debug("ssh-keygen: unknown key type '%s'", keytype)