summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceMAAS.py
diff options
context:
space:
mode:
authorharlowja <harlowja@virtualbox.rhel>2013-02-21 22:51:02 -0800
committerharlowja <harlowja@virtualbox.rhel>2013-02-21 22:51:02 -0800
commit575a084808db7d5ac607a848b018abe676e73a91 (patch)
tree34e179b0623074e6cd6fc03e4b3db001f8e493bf /cloudinit/sources/DataSourceMAAS.py
parent9dfb60d3144860334ab1ad1d72920d962139461f (diff)
parentd4886b65549c886499141872a9928412a74bbea2 (diff)
downloadvyos-cloud-init-575a084808db7d5ac607a848b018abe676e73a91.tar.gz
vyos-cloud-init-575a084808db7d5ac607a848b018abe676e73a91.zip
Update to code on trunk.
Diffstat (limited to 'cloudinit/sources/DataSourceMAAS.py')
-rw-r--r--cloudinit/sources/DataSourceMAAS.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/cloudinit/sources/DataSourceMAAS.py b/cloudinit/sources/DataSourceMAAS.py
index dc048943..6e1133b2 100644
--- a/cloudinit/sources/DataSourceMAAS.py
+++ b/cloudinit/sources/DataSourceMAAS.py
@@ -340,8 +340,7 @@ if __name__ == "__main__":
'token_secret': args.tsec, 'consumer_secret': args.csec}
if args.config:
- with open(args.config) as fp:
- cfg = util.load_yaml(fp.read())
+ cfg = util.read_conf(args.config)
if 'datasource' in cfg:
cfg = cfg['datasource']['MAAS']
for key in creds.keys():
@@ -350,7 +349,7 @@ if __name__ == "__main__":
def geturl(url, headers_cb):
req = urllib2.Request(url, data=None, headers=headers_cb(url))
- return(urllib2.urlopen(req).read())
+ return (urllib2.urlopen(req).read())
def printurl(url, headers_cb):
print "== %s ==\n%s\n" % (url, geturl(url, headers_cb))