diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-01-09 13:12:40 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-01-09 13:12:40 -0500 |
commit | b9314a18a052e934643c93b81dc938b3e5b69307 (patch) | |
tree | d2ef38bc759a0ee449f7bc1624dca3308037cfff /cloudinit/sources/DataSourceAzure.py | |
parent | 3a4bf799ca2dd785fe1a5a35f188aed4f54ab5e5 (diff) | |
download | vyos-cloud-init-b9314a18a052e934643c93b81dc938b3e5b69307.tar.gz vyos-cloud-init-b9314a18a052e934643c93b81dc938b3e5b69307.zip |
Azure: minor changes for filename as strings and logging.
We were passing a unicode string to 'runcmd' in the path to the .crt file.
That is because the keyname was coming from ovf file as unicode.
Ie:
u'/var/lib/waagent/6BE7A7C3C8A8F4B123CCA5D0C2F1BE4CA7B63ED7.crt'
Then, logging was extending not appending errors.
Diffstat (limited to 'cloudinit/sources/DataSourceAzure.py')
-rw-r--r-- | cloudinit/sources/DataSourceAzure.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py index b18c57e7..97f151d6 100644 --- a/cloudinit/sources/DataSourceAzure.py +++ b/cloudinit/sources/DataSourceAzure.py @@ -154,7 +154,7 @@ class DataSourceAzureNet(sources.DataSource): fp_files = [] for pk in self.cfg.get('_pubkeys', []): - bname = pk['fingerprint'] + ".crt" + bname = str(pk['fingerprint'] + ".crt") fp_files += [os.path.join(mycfg['data_dir'], bname)] missing = util.log_time(logfunc=LOG.debug, msg="waiting for files", @@ -247,7 +247,7 @@ def pubkeys_from_crt_files(flist): try: pubkeys.append(crtfile_to_pubkey(fname)) except util.ProcessExecutionError: - errors.extend(fname) + errors.append(fname) if errors: LOG.warn("failed to convert the crt files to pubkey: %s" % errors) |