Re: [PATCH 2/3 master] Fix ifcfg logging message.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/14/2010 10:02 AM, Radek Vykydal wrote:
Embarassing to screw it up once you decide to use it.
---
  pyanaconda/network.py |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index f1d37f9..a271d52 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -258,7 +258,7 @@ class NetworkDevice(IfcfgFile):
          ifcfglog.debug("%s:\n%s" % (self.path, self.fileContent()))
          ifcfglog.debug("NetworkDevice %s:\n%s" % (self.iface, self.__str__()))
          ifcfglog.debug("writeIfcfgFile %s to %s%s" % (self.iface, self.path,
-                                                  (self._dirty and "" or " not needed")))
+                                                  (not self._dirty and " not needed" or "")))

I think you could use the cool python syntax instead:

("" if self._dirty else " not needed")

Ales

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux