summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cloudinit/sources/DataSourceBigstep.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/cloudinit/sources/DataSourceBigstep.py b/cloudinit/sources/DataSourceBigstep.py
index c22ffdb6..2d66c609 100644
--- a/cloudinit/sources/DataSourceBigstep.py
+++ b/cloudinit/sources/DataSourceBigstep.py
@@ -5,6 +5,7 @@
#
import json
+import errno
from cloudinit import log as logging
from cloudinit import sources
@@ -22,7 +23,13 @@ class DataSourceBigstep(sources.DataSource):
self.userdata_raw = ""
def get_data(self, apply_filter=False):
- url = get_url_from_file()
+ try:
+ url = get_url_from_file()
+ except IOError as e:
+ if e.errno == errno.ENOENT:
+ return False
+ else:
+ raise
response = url_helper.readurl(url)
decoded = json.loads(response.contents)
self.metadata = decoded["metadata"]