From 6e276cac1ab281cdf14f3a918d10cb65ce9e6c50 Mon Sep 17 00:00:00 2001 From: Javier Jardon Date: Mon, 23 Mar 2015 23:19:33 +0000 Subject: simple-network: Use function to ensure directory path will exist Change-Id: I44693d15aa5e92d5f09720065788adff34f8685c --- morphlib/exts/simple-network.configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/morphlib/exts/simple-network.configure b/morphlib/exts/simple-network.configure index b4988125..130b96c9 100755 --- a/morphlib/exts/simple-network.configure +++ b/morphlib/exts/simple-network.configure @@ -109,6 +109,7 @@ class SimpleNetworkConfigurationExtension(cliapp.Application): iface_file = self.generate_iface_file(stanzas) directory_path = os.path.join(args[0], "etc", "network") + self.make_sure_path_exists(directory_path) file_path = os.path.join(directory_path, "interfaces") with open(file_path, "w") as f: f.write(iface_file) @@ -152,6 +153,7 @@ class SimpleNetworkConfigurationExtension(cliapp.Application): continue directory_path = os.path.join(args[0], "etc", "systemd", "network") + self.make_sure_path_exists(directory_path) file_path = os.path.join(directory_path, "%s-%s.network" % (i, stanza['name'])) -- cgit v1.2.1