You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
746 B
20 lines
746 B
commit 6870daf7ef98579c73473fb8b8852abf6ce7f1f8
|
|
Author: Neil Wilson <neil@aldur.co.uk>
|
|
Date: Wed Jul 4 16:58:53 2012 +0100
|
|
|
|
utils.py: Add guard for blank responses to get-instance-metadata
|
|
|
|
diff --git a/boto/utils.py b/boto/utils.py
|
|
index 860a26c..d71eb7a 100644
|
|
--- a/boto/utils.py
|
|
+++ b/boto/utils.py
|
|
@@ -251,7 +251,7 @@ class LazyLoadMetadata(dict):
|
|
val = boto.utils.retry_url(self._url + urllib.quote(resource,
|
|
safe="/:"),
|
|
num_retries=self._num_retries)
|
|
- if val[0] == '{':
|
|
+ if val and val[0] == '{':
|
|
val = json.loads(val)
|
|
else:
|
|
p = val.find('\n')
|