Only do the debug log if types registered.

This commit is contained in:
Joshua Harlow 2013-07-24 00:51:14 -07:00
parent 5522a087e1
commit d06cd91df6

View File

@ -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)