diff options
Diffstat (limited to 'cloudinit/sources/DataSourceGCE.py')
-rw-r--r-- | cloudinit/sources/DataSourceGCE.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cloudinit/sources/DataSourceGCE.py b/cloudinit/sources/DataSourceGCE.py index 8a46f933..c96cfffd 100644 --- a/cloudinit/sources/DataSourceGCE.py +++ b/cloudinit/sources/DataSourceGCE.py @@ -52,7 +52,10 @@ class DataSourceGCE(sources.DataSource): } for mkey in url_map.iterkeys(): - resp = url_helper.readurl(url=url_map[mkey], headers=headers) + try: + resp = url_helper.readurl(url=url_map[mkey], headers=headers) + except IOError: + return False if resp.ok(): if mkey == 'public-keys': pub_keys = [self._trim_key(k) for k in resp.contents.splitlines()] |