From 685ffd49561bb92971f6b76e4690b86d7d6ecc0f Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Fri, 19 Aug 2016 13:58:52 -0400 Subject: Minor cleanups to atomic_helper and add unit tests. Change atomic_helper.write_file to have same same signature as write_file. Add some simple unit tests for atomic_helper. --- cloudinit/dhclient_hook.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cloudinit/dhclient_hook.py') diff --git a/cloudinit/dhclient_hook.py b/cloudinit/dhclient_hook.py index 9dcbe39c..82cb1855 100644 --- a/cloudinit/dhclient_hook.py +++ b/cloudinit/dhclient_hook.py @@ -3,7 +3,7 @@ import os -from cloudinit.atomic_helper import atomic_write_json +from cloudinit import atomic_helper from cloudinit import log as logging from cloudinit import stages @@ -46,5 +46,5 @@ class LogDhclient(object): envs = os.environ if self.hook_file is None: return - atomic_write_json(self.hook_file, self.get_vals(envs)) + atomic_helper.write_json(self.hook_file, self.get_vals(envs)) LOG.debug("Wrote dhclient options in %s", self.hook_file) -- cgit v1.2.3