summaryrefslogtreecommitdiff
path: root/cloudinit/CloudConfig/cc_set_hostname.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2011-01-26 09:03:46 -0500
committerScott Moser <smoser@ubuntu.com>2011-01-26 09:03:46 -0500
commitbe11324740ad4624c45a6e909643ab84aecdbf16 (patch)
treea7a2a7e8a4b4a05ea5a071610b7c52bf4e6ef810 /cloudinit/CloudConfig/cc_set_hostname.py
parentf69109bb2be91a7210a88bfb1b4467f80dc6ba64 (diff)
downloadvyos-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/CloudConfig/cc_set_hostname.py')
-rw-r--r--cloudinit/CloudConfig/cc_set_hostname.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/CloudConfig/cc_set_hostname.py b/cloudinit/CloudConfig/cc_set_hostname.py
index 34621e97..2b130810 100644
--- a/cloudinit/CloudConfig/cc_set_hostname.py
+++ b/cloudinit/CloudConfig/cc_set_hostname.py
@@ -26,7 +26,7 @@ def handle(name,cfg,cloud,log,args):
try:
hostname = util.get_cfg_option_str(cfg,"hostname",cloud.get_hostname())
set_hostname(hostname, log)
- except Exception, e:
+ except Exception as e:
util.logexc(log)
log.warn("failed to set hostname\n")