diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2015-03-25 13:34:12 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@baserock.org> | 2015-03-25 13:34:12 +0000 |
commit | 2f8dd7c1f603799c1dfde512c9e160d8fb9d02f4 (patch) | |
tree | 0b1671b45695eca7f03369635480db36603fd8dd | |
parent | 3723e04ade96aee6a2bc0a13387aa46e5b2718b5 (diff) | |
parent | 6e276cac1ab281cdf14f3a918d10cb65ce9e6c50 (diff) | |
download | morph-2f8dd7c1f603799c1dfde512c9e160d8fb9d02f4.tar.gz |
Merge "simple-network: Use function to ensure directory path will exist"
-rwxr-xr-x | morphlib/exts/simple-network.configure | 2 |
1 files changed, 2 insertions, 0 deletions
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'])) |