diff options
| author | Scott Moser <smoser@brickies.net> | 2016-09-12 14:56:09 -0400 |
|---|---|---|
| committer | Scott Moser <smoser@brickies.net> | 2016-09-12 14:56:09 -0400 |
| commit | 759ff5b4244d643180af49f2e3e8711580560d45 (patch) | |
| tree | 9e364ae0e39346011f2b213f2387d5cb4d1961c7 /cloudinit/sources/DataSourceOVF.py | |
| parent | 37527ac38c2829dba6d284f23ed40f007a7ee176 (diff) | |
| parent | 65ace7b35494dba1747eece815754ab8573d83d8 (diff) | |
| download | vyos-cloud-init-759ff5b4244d643180af49f2e3e8711580560d45.tar.gz vyos-cloud-init-759ff5b4244d643180af49f2e3e8711580560d45.zip | |
merge from master at 0.7.7-31-g65ace7b
Diffstat (limited to 'cloudinit/sources/DataSourceOVF.py')
| -rw-r--r-- | cloudinit/sources/DataSourceOVF.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cloudinit/sources/DataSourceOVF.py b/cloudinit/sources/DataSourceOVF.py index 43347cfb..5b3bdb4e 100644 --- a/cloudinit/sources/DataSourceOVF.py +++ b/cloudinit/sources/DataSourceOVF.py @@ -237,7 +237,7 @@ def wait_for_imc_cfg_file(dirpath, filename, maxwait=180, naplen=5): def read_vmware_imc(config): md = {} cfg = {} - ud = "" + ud = None if config.host_name: if config.domain_name: md['local-hostname'] = config.host_name + "." + config.domain_name @@ -256,7 +256,7 @@ def read_ovf_environment(contents): props = get_properties(contents) md = {} cfg = {} - ud = "" + ud = None cfg_props = ['password'] md_props = ['seedfrom', 'local-hostname', 'public-keys', 'instance-id'] for (prop, val) in props.items(): @@ -268,9 +268,9 @@ def read_ovf_environment(contents): cfg[prop] = val elif prop == "user-data": try: - ud = base64.decodestring(val) + ud = base64.b64decode(val.encode()) except Exception: - ud = val + ud = val.encode() return (md, ud, cfg) |
