summaryrefslogtreecommitdiff
path: root/cloudinit/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/__init__.py')
-rw-r--r--cloudinit/__init__.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/cloudinit/__init__.py b/cloudinit/__init__.py
index 82390eeb..f3541ee5 100644
--- a/cloudinit/__init__.py
+++ b/cloudinit/__init__.py
@@ -589,11 +589,10 @@ def partwalker_handle_handler(pdata, _ctype, _filename, payload):
modfname = modname + ".py"
util.write_file("%s/%s" % (pdata['handlerdir'], modfname), payload, 0600)
- pdata['handlercount'] = curcount + 1
-
try:
mod = __import__(modname)
handler_register(mod, pdata['handlers'], pdata['data'], frequency)
+ pdata['handlercount'] = curcount + 1
except:
util.logexc(log)
traceback.print_exc(file=sys.stderr)