Re: [PATCH 06/22] Use proper attribute instead of NetworkDevice 'DESC' hack (#520146)

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

 



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

Ack.

On Tue, 27 Apr 2010, Radek Vykydal wrote:

Note: other occurences of 'DESC' usage are replaced in following
patches.
---
iw/advanced_storage.py |    2 +-
network.py             |    7 +++----
2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/iw/advanced_storage.py b/iw/advanced_storage.py
index 902d8ac..d3d4360 100644
--- a/iw/advanced_storage.py
+++ b/iw/advanced_storage.py
@@ -53,7 +53,7 @@ def addFcoeDrive(anaconda):
            continue

        i = store.append(None)
-        desc = netdevs[dev].get("DESC")
+        desc = netdevs[dev].description
        if desc:
            desc = "%s - %s" %(dev, desc)
        else:
diff --git a/network.py b/network.py
index 974784f..20a21b2 100644
--- a/network.py
+++ b/network.py
@@ -245,6 +245,7 @@ class NetworkDevice(IfcfgFile):
        self.logfile = logfile
        if iface.startswith('ctc'):
            self.info["TYPE"] = "CTC"
+        self.description = ""

    def clear(self):
        IfcfgFile.clear(self)
@@ -256,8 +257,6 @@ class NetworkDevice(IfcfgFile):
        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")
@@ -784,8 +783,8 @@ class Network:
                    addr = addr.lower()

                    s = ""
-                    if len(dev.get("DESC")) > 0:
-                        s = "# %s (rule written by anaconda)\n" % (dev.get("DESC"),)
+                    if len(dev.description) > 0:
+                        s = "# %s (rule written by anaconda)\n" % (dev.description,)
                    else:
                        s = "# %s (rule written by anaconda)\n" % (devname,)
                        s = s + 'SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS=="?*", ATTR{address}=="%s", ATTR{type}=="1", KERNEL=="%s*", NAME="%s"\n' % (addr, basename, devname,)


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

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

iEYEARECAAYFAkvfioQACgkQ5hsjjIy1VkkBjACg5qyT61VblcyUIWvipMQrqwXY
V9EAoMfq5twENOs92R0ca2c1q0joSHSI
=zl0b
-----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