[PATCH] Change IfcfgFile.write to match its superclass
David Shea
dshea at redhat.com
Fri Sep 13 13:48:12 UTC 2013
We never use the directory parameter so there's no reason for
IfcfgFile.write not to match SimpleConfig.write
---
pyanaconda/simpleconfig.py | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/pyanaconda/simpleconfig.py b/pyanaconda/simpleconfig.py
index 5e474e9..fe30b07 100644
--- a/pyanaconda/simpleconfig.py
+++ b/pyanaconda/simpleconfig.py
@@ -181,15 +181,13 @@ class IfcfgFile(SimpleConfigFile):
SimpleConfigFile.read(self, self.path)
return len(self.info)
- def write(self, directory=None, use_tmp=False):
+ def write(self, filename=None, use_tmp=False):
""" Writes values into ifcfg file.
"""
- if not directory:
- path = self.path
- else:
- path = os.path.join(directory, os.path.basename(self.path))
+ if filename is None:
+ filename = self.path
# ifcfg-rh is using inotify IN_CLOSE_WRITE event so we don't use
# temporary file for new configuration
- SimpleConfigFile.write(self, path, use_tmp=use_tmp)
+ SimpleConfigFile.write(self, filename, use_tmp=use_tmp)
--
1.8.3.1
More information about the anaconda-patches
mailing list