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

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



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


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