diff options
author | Scott Moser <smoser@ubuntu.com> | 2015-01-16 13:21:08 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2015-01-16 13:21:08 -0500 |
commit | ae2f5123faab45e71e4dcf3237d7dac59a4c66b7 (patch) | |
tree | d5e9d5208bea42ac5da3956c73261c2a4379d71e /cloudinit/sources/DataSourceGCE.py | |
parent | 64f27180fb349646ed7d073248fe22685df428b4 (diff) | |
download | vyos-cloud-init-ae2f5123faab45e71e4dcf3237d7dac59a4c66b7.tar.gz vyos-cloud-init-ae2f5123faab45e71e4dcf3237d7dac59a4c66b7.zip |
pep8 fixes
Diffstat (limited to 'cloudinit/sources/DataSourceGCE.py')
-rw-r--r-- | cloudinit/sources/DataSourceGCE.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cloudinit/sources/DataSourceGCE.py b/cloudinit/sources/DataSourceGCE.py index f877b3d1..2cf8fdcd 100644 --- a/cloudinit/sources/DataSourceGCE.py +++ b/cloudinit/sources/DataSourceGCE.py @@ -29,6 +29,7 @@ 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) @@ -59,7 +60,8 @@ class DataSourceGCE(sources.DataSource): ('local-hostname', 'instance/hostname', True), ('public-keys', 'project/attributes/sshKeys', False), ('user-data', 'instance/attributes/user-data', False), - ('user-data-encoding', 'instance/attributes/user-data-encoding', False), + ('user-data-encoding', 'instance/attributes/user-data-encoding', + False), ] # if we cannot resolve the metadata server, then no point in trying @@ -106,7 +108,8 @@ class DataSourceGCE(sources.DataSource): encoding = self.metadata.get('user-data-encoding') if encoding: if encoding == 'base64': - self.metadata['user-data'] = b64decode(self.metadata['user-data']) + self.metadata['user-data'] = b64decode( + self.metadata['user-data']) else: LOG.warn('unknown user-data-encoding: %s, ignoring', encoding) |