summaryrefslogtreecommitdiff
path: root/cloudinit/user_data.py
diff options
context:
space:
mode:
authorharlowja <harlowja@virtualbox.rhel>2013-02-19 22:51:49 -0800
committerharlowja <harlowja@virtualbox.rhel>2013-02-19 22:51:49 -0800
commit6d40d5b2e3da9577d4a2686444d47125e62817fe (patch)
tree3dc28b3e6157513aedb4a21fcabf35aaefaf5e1f /cloudinit/user_data.py
parent6a6a2f7c337e18d84d7031ba60d5adf6a93256fc (diff)
downloadvyos-cloud-init-6d40d5b2e3da9577d4a2686444d47125e62817fe.tar.gz
vyos-cloud-init-6d40d5b2e3da9577d4a2686444d47125e62817fe.zip
Continue working on integrating requests.
Diffstat (limited to 'cloudinit/user_data.py')
-rw-r--r--cloudinit/user_data.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/cloudinit/user_data.py b/cloudinit/user_data.py
index 803ffc3a..4a640f1e 100644
--- a/cloudinit/user_data.py
+++ b/cloudinit/user_data.py
@@ -29,7 +29,6 @@ from email.mime.text import MIMEText
from cloudinit import handlers
from cloudinit import log as logging
-from cloudinit import url_helper
from cloudinit import util
LOG = logging.getLogger(__name__)
@@ -173,10 +172,10 @@ class UserDataProcessor(object):
if include_once_on and os.path.isfile(include_once_fn):
content = util.load_file(include_once_fn)
else:
- resp = url_helper.readurl(include_url)
- if include_once_on and resp.ok():
+ resp = util.read_file_or_url(include_url)
+ if include_once_on and resp.ok:
util.write_file(include_once_fn, str(resp), mode=0600)
- if resp.ok():
+ if resp.ok:
content = str(resp)
else:
LOG.warn(("Fetching from %s resulted in"