diff options
author | Wayne Witzel III <wayne.witzel@canonical.com> | 2015-01-06 11:41:05 -0500 |
---|---|---|
committer | Wayne Witzel III <wayne.witzel@canonical.com> | 2015-01-06 11:41:05 -0500 |
commit | c8ab70b9413e3d8d0f240d968023258b8a0970e6 (patch) | |
tree | 0012a26102a4da4b5ccacfc9218b77bca9b14f59 /cloudinit | |
parent | b7632baa817a8425c2dcab4a01e2f7f0983e5f9e (diff) | |
download | vyos-cloud-init-c8ab70b9413e3d8d0f240d968023258b8a0970e6.tar.gz vyos-cloud-init-c8ab70b9413e3d8d0f240d968023258b8a0970e6.zip |
Corrected errant logging message.
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/sources/DataSourceGCE.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cloudinit/sources/DataSourceGCE.py b/cloudinit/sources/DataSourceGCE.py index e6f3651c..92e5a28e 100644 --- a/cloudinit/sources/DataSourceGCE.py +++ b/cloudinit/sources/DataSourceGCE.py @@ -29,7 +29,6 @@ BUILTIN_DS_CONFIG = { } REQUIRED_FIELDS = ('instance-id', 'availability-zone', 'local-hostname') - class DataSourceGCE(sources.DataSource): def __init__(self, sys_cfg, distro, paths): sources.DataSource.__init__(self, sys_cfg, distro, paths) @@ -104,11 +103,12 @@ class DataSourceGCE(sources.DataSource): lines = self.metadata['public-keys'].splitlines() self.metadata['public-keys'] = [self._trim_key(k) for k in lines] - if self.metadata.get('user-data-encoding'): - if self.metadata['user-data-encoding'] == 'base64': + encoding = self.metadata.get('user-data-encoding') + if encoding: + if encoding == 'base64': self.metadata['user-data'] = b64decode(self.metadata['user-data']) else: - LOG.warn('user-data-encoding: unknown encoding specified', None, None) + LOG.warn('unknown user-data-encoding: %s, ignoring', encoding) return found |