summaryrefslogtreecommitdiff
path: root/cloudinit/DataSourceEc2.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/DataSourceEc2.py')
-rw-r--r--cloudinit/DataSourceEc2.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/DataSourceEc2.py b/cloudinit/DataSourceEc2.py
index 1c0edc59..8ecb28ad 100644
--- a/cloudinit/DataSourceEc2.py
+++ b/cloudinit/DataSourceEc2.py
@@ -99,9 +99,9 @@ class DataSourceEc2(DataSource.DataSource):
resp = urllib2.urlopen(req, timeout=2)
if resp.read() != "": return True
reason = "empty data [%s]" % resp.getcode()
- except urllib2.HTTPError, e:
+ except urllib2.HTTPError as e:
reason = "http error [%s]" % e.code
- except urllib2.URLError, e:
+ except urllib2.URLError as e:
reason = "url error [%s]" % e.reason
if x == 0: