FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 10-14-2010, 08:46 AM
Ales Kozumplik
 
Default 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:
%s" % (self.path, self.fileContent()))
ifcfglog.debug("NetworkDevice %s:
%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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 10-14-2010, 08:55 AM
Radek Vykydal
 
Default Fix ifcfg logging message.

On 10/14/2010 10:46 AM, Ales Kozumplik wrote:

On 10/14/2010 10:02 AM, Radek Vykydal wrote:


+ (not self._dirty
and " not needed" or "")))


I think you could use the cool python syntax instead:

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



Nice, I will.

Radek

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

Thread Tools




All times are GMT. The time now is 11:13 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org