summaryrefslogtreecommitdiff
path: root/cloudinit/handlers/__init__.py
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-05-24 17:58:18 +0200
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-05-24 17:58:18 +0200
commit81156aa423309c72f17709eea994e7e06ebc431c (patch)
tree4ee78fb024c5f03a3c12e39e1adfc1b0cb84063b /cloudinit/handlers/__init__.py
parent14040a9c8df6e8406acb79fd653873bb05cb4d40 (diff)
parentea4bc2c603a9d964a918e01d00e39a851e979830 (diff)
downloadvyos-cloud-init-81156aa423309c72f17709eea994e7e06ebc431c.tar.gz
vyos-cloud-init-81156aa423309c72f17709eea994e7e06ebc431c.zip
rebased with upstream and reolved merge conflicts
Diffstat (limited to 'cloudinit/handlers/__init__.py')
-rw-r--r--cloudinit/handlers/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cloudinit/handlers/__init__.py b/cloudinit/handlers/__init__.py
index 53d5604a..b6c43ce8 100644
--- a/cloudinit/handlers/__init__.py
+++ b/cloudinit/handlers/__init__.py
@@ -71,8 +71,8 @@ INCLUSION_SRCH = sorted(list(INCLUSION_TYPES_MAP.keys()),
key=(lambda e: 0 - len(e)))
+@six.add_metaclass(abc.ABCMeta)
class Handler(object):
- __metaclass__ = abc.ABCMeta
def __init__(self, frequency, version=2):
self.handler_version = version
@@ -118,7 +118,7 @@ def run_part(mod, data, filename, payload, frequency, headers):
mod.handle_part(data, content_type, filename, payload)
else:
raise ValueError("Unknown module version %s" % (mod_ver))
- except:
+ except Exception:
util.logexc(LOG, "Failed calling handler %s (%s, %s, %s) with "
"frequency %s", mod, content_type, filename, mod_ver,
frequency)
@@ -157,7 +157,7 @@ def walker_handle_handler(pdata, _ctype, _filename, payload):
# register if it fails starting.
handlers.register(mod, initialized=True)
pdata['handlercount'] = curcount + 1
- except:
+ except Exception:
util.logexc(LOG, "Failed at registering python file: %s (part "
"handler %s)", modfname, curcount)