From 2c1627c2f3aec4befc535c0239097ffccaf89671 Mon Sep 17 00:00:00 2001 From: Oleksii Kliukin Date: Fri, 10 Jul 2015 10:33:07 +0200 Subject: [PATCH] get rid of yaml module, since AWS instance-identity natively sends JSON. --- helpers/aws.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/helpers/aws.py b/helpers/aws.py index b47e4e0f..26c65e89 100644 --- a/helpers/aws.py +++ b/helpers/aws.py @@ -1,8 +1,6 @@ import logging -import re import requests from requests.exceptions import RequestException -import yaml import boto.ec2 logger = logging.getLogger(__name__) @@ -27,7 +25,7 @@ class AWSConnection: return if r.ok: try: - content = yaml.load(r.content) + content = r.json() self.instance_id = content['instanceId'] self.region = content['region'] except Exception as e: