diff options
author | Daniel Watkins <daniel.watkins@canonical.com> | 2015-04-20 15:24:00 +0100 |
---|---|---|
committer | Daniel Watkins <daniel.watkins@canonical.com> | 2015-04-20 15:24:00 +0100 |
commit | 47eb1c4b52a2f5f4f8ea657918acd94209668bd7 (patch) | |
tree | cfc566772f7ef093fc8bc21531bd5dbcc88b66f0 /cloudinit/sources/DataSourceGCE.py | |
parent | 844ebbee112143e85fb46b4b5ed649729f903d2c (diff) | |
download | vyos-cloud-init-47eb1c4b52a2f5f4f8ea657918acd94209668bd7.tar.gz vyos-cloud-init-47eb1c4b52a2f5f4f8ea657918acd94209668bd7.zip |
Rename found variable in GCE data source.
Diffstat (limited to 'cloudinit/sources/DataSourceGCE.py')
-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 255f5f45..9cf2f56e 100644 --- a/cloudinit/sources/DataSourceGCE.py +++ b/cloudinit/sources/DataSourceGCE.py @@ -93,14 +93,14 @@ class DataSourceGCE(sources.DataSource): metadata_fetcher = GoogleMetadataFetcher(self.metadata_address) # iterate over url_map keys to get metadata items - found = False + running_on_gce = False for (mkey, path, required, is_text) in url_map: value = metadata_fetcher.get_value(path, is_text) if value: - found = True + running_on_gce = True if required and value is None: msg = "required url %s returned nothing. not GCE" - if not found: + if not running_on_gce: LOG.debug(msg, path) else: LOG.warn(msg, path) @@ -119,7 +119,7 @@ class DataSourceGCE(sources.DataSource): else: LOG.warn('unknown user-data-encoding: %s, ignoring', encoding) - return found + return running_on_gce @property def launch_index(self): |