diff options
author | Scott Moser <smoser@ubuntu.com> | 2011-01-26 09:03:46 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2011-01-26 09:03:46 -0500 |
commit | be11324740ad4624c45a6e909643ab84aecdbf16 (patch) | |
tree | a7a2a7e8a4b4a05ea5a071610b7c52bf4e6ef810 /cloudinit/DataSourceEc2.py | |
parent | f69109bb2be91a7210a88bfb1b4467f80dc6ba64 (diff) | |
download | vyos-cloud-init-be11324740ad4624c45a6e909643ab84aecdbf16.tar.gz vyos-cloud-init-be11324740ad4624c45a6e909643ab84aecdbf16.zip |
change 'except' syntax to python 3 style.
Everywhere that there occurred:
except Exception, e:
changed to
except Exception as e:
Diffstat (limited to 'cloudinit/DataSourceEc2.py')
-rw-r--r-- | cloudinit/DataSourceEc2.py | 4 |
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: |