diff options
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/handlers/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/handlers/__init__.py b/cloudinit/handlers/__init__.py index 156e228d..0ef704f7 100644 --- a/cloudinit/handlers/__init__.py +++ b/cloudinit/handlers/__init__.py @@ -102,7 +102,7 @@ def run_part(mod, data, ctype, filename, payload, frequency): try: mod_ver = int(mod_ver) except: - mod_ver = None + mod_ver = 1 try: if mod_ver and mod_ver >= 2: # Treat as v. 2 which does get a frequency @@ -134,12 +134,12 @@ def walker_handle_handler(pdata, _ctype, _filename, payload): modfname = "%s.py" % (modfname) # TODO: Check if path exists?? util.write_file(modfname, payload, 0600) + pdata['handlercount'] = curcount + 1 handlers = pdata['handlers'] try: mod = fixup_handler(importer.import_module(modname)) handlers.register(mod) call_begin(mod, pdata['data'], frequency) - pdata['handlercount'] = curcount + 1 except: util.logexc(LOG, "Failed at registered python file: %s", modfname) |