diff options
author | Javier Jardon <jjardon@gnome.org> | 2015-03-23 23:19:33 +0000 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2015-03-24 00:10:22 +0000 |
commit | 6e276cac1ab281cdf14f3a918d10cb65ce9e6c50 (patch) | |
tree | 7b1fe60446d64e72d006c8f69de9f663c3ee5ab0 /morphlib | |
parent | 7af6598f7019f71833bd9362d580ac07abdb92dd (diff) | |
download | morph-6e276cac1ab281cdf14f3a918d10cb65ce9e6c50.tar.gz |
simple-network: Use function to ensure directory path will exist
Change-Id: I44693d15aa5e92d5f09720065788adff34f8685c
Diffstat (limited to 'morphlib')
-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'])) |