[PATCH] Fix yet another pylint error caught after the fact.
David Shea
dshea at redhat.com
Thu Sep 12 15:01:18 UTC 2013
On 09/12/2013 10:55 AM, Chris Lumens wrote:
> Guess what I'm getting tired of doing.
> ---
> pyanaconda/desktop.py | 2 +-
> pyanaconda/simpleconfig.py | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/pyanaconda/desktop.py b/pyanaconda/desktop.py
> index eaf73c5..3d73d32 100644
> --- a/pyanaconda/desktop.py
> +++ b/pyanaconda/desktop.py
> @@ -49,7 +49,7 @@ class Desktop(SimpleConfigFile):
> super(Desktop, self).__init__()
> self.runlevel = 3
>
> - def write(self, filename=None):
> + def write(self, filename=None, use_tmp=True):
> if self.getDefaultDesktop():
> f = open(ROOT_PATH + "/etc/sysconfig/desktop", "w")
> f.write(str(self))
> diff --git a/pyanaconda/simpleconfig.py b/pyanaconda/simpleconfig.py
> index ae2e3dc..5e474e9 100644
> --- a/pyanaconda/simpleconfig.py
> +++ b/pyanaconda/simpleconfig.py
> @@ -181,7 +181,7 @@ class IfcfgFile(SimpleConfigFile):
> SimpleConfigFile.read(self, self.path)
> return len(self.info)
>
> - def write(self, directory=None):
> + def write(self, directory=None, use_tmp=False):
> """ Writes values into ifcfg file.
> """
>
> @@ -192,4 +192,4 @@ class IfcfgFile(SimpleConfigFile):
>
> # 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=False)
> + SimpleConfigFile.write(self, path, use_tmp=use_tmp)
The change in IfcfgFile is straightforward enough, but Desktop isn't
using the use_tmp parameter (or filename, for that matter). Is it
appropriate for it to be using write() to do what it does?
More information about the anaconda-patches
mailing list