summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2013-07-24 00:51:14 -0700
committerJoshua Harlow <harlowja@gmail.com>2013-07-24 00:51:14 -0700
commit18a625f958aaecf82a82db24b31290408d27882a (patch)
tree5b3330fbc75f6a404e76ebe7f0bbf55c4675eac4
parentb898aa96412367fb0cb0e920bb7d3b24933df414 (diff)
downloadvyos-cloud-init-18a625f958aaecf82a82db24b31290408d27882a.tar.gz
vyos-cloud-init-18a625f958aaecf82a82db24b31290408d27882a.zip
Only do the debug log if types registered.
-rw-r--r--cloudinit/stages.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/cloudinit/stages.py b/cloudinit/stages.py
index d7211eb6..07c55802 100644
--- a/cloudinit/stages.py
+++ b/cloudinit/stages.py
@@ -375,8 +375,9 @@ class Init(object):
mod = importer.import_module(mod_locs[0])
mod = handlers.fixup_handler(mod)
types = c_handlers.register(mod)
- LOG.debug("Added custom handler for %s from %s", types,
- fname)
+ if types:
+ LOG.debug("Added custom handler for %s from %s",
+ types, fname)
except Exception:
util.logexc(LOG, "Failed to register handler from %s",
fname)