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/CloudConfig/cc_rsyslog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cloudinit/CloudConfig/cc_rsyslog.py') diff --git a/cloudinit/CloudConfig/cc_rsyslog.py b/cloudinit/CloudConfig/cc_rsyslog.py index 3320dbb2..a8ee8476 100644 --- a/cloudinit/CloudConfig/cc_rsyslog.py +++ b/cloudinit/CloudConfig/cc_rsyslog.py @@ -64,7 +64,7 @@ def handle(name,cfg,cloud,log,args): try: util.write_file(filename, content + "\n", omode=omode) - except Exception, e: + except Exception as e: log.debug(traceback.format_exc(e)) elst.append((content, "failed to write to %s" % filename)) @@ -83,7 +83,7 @@ def handle(name,cfg,cloud,log,args): p = util.subp(['service', 'rsyslog', 'restart']) restarted = True - except Exception, e: + except Exception as e: elst.append(("restart", str(e))) if restarted: -- cgit v1.2.3