From be11324740ad4624c45a6e909643ab84aecdbf16 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Wed, 26 Jan 2011 09:03:46 -0500 Subject: change 'except' syntax to python 3 style. Everywhere that there occurred: except Exception, e: changed to except Exception as e: --- cloudinit/DataSourceEc2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cloudinit/DataSourceEc2.py') 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: -- cgit v1.2.3