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

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

 



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):
-- 
1.6.0.6

_______________________________________________
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