Re: [PATCH 04/22] Network.__str__() little cleanup (#520146)

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I had comments originally, but bcl brought them up.  After reading your
explanation, ack.

On Tue, 27 Apr 2010, Radek Vykydal wrote:

Have line formatting only at one place, common for all
keys (at the end of __str__ method)
---
network.py |    2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/network.py b/network.py
index 0a90800..e353a79 100644
--- a/network.py
+++ b/network.py
@@ -253,12 +253,12 @@ class NetworkDevice(IfcfgFile):

    def __str__(self):
        s = ""
-        s = s + "DEVICE=" + self.info["DEVICE"] + "\n"
        keys = self.info.keys()
        keys.sort()
        keys.remove("DEVICE")
        if "DESC" in keys:
            keys.remove("DESC")
+        keys.insert(0, "DEVICE")
        if "KEY" in keys:
            keys.remove("KEY")
        if iutil.isS390() and ("HWADDR" in keys):


- -- David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEUEARECAAYFAkvfiSoACgkQ5hsjjIy1VknoaACfRtSJnDjEhczQ5SNChDHuwbE5
nWkAli+LJ/uLw9lnzqVAb49gx/PXTmI=
=2ItZ
-----END PGP SIGNATURE-----

_______________________________________________
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