[master 4/4] Default to a string when sorting mountpoints in FSSet.umountFilesystems.

dwlehman installerbot-noreply at redhat.com
Mon Jun 29 19:06:06 UTC 2015


From: David Lehman <dlehman at redhat.com>

The default of None caused a TypeError when sorting swap devices under
python3.

Related: rhbz#1113207
---
 blivet/osinstall.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blivet/osinstall.py b/blivet/osinstall.py
index 7608bf6..61e32d1 100644
--- a/blivet/osinstall.py
+++ b/blivet/osinstall.py
@@ -606,7 +606,7 @@ def umountFilesystems(self, swapoff=True):
         devices = list(self.mountpoints.values()) + self.swapDevices
         devices.extend([self.dev, self.devshm, self.devpts, self.sysfs,
                         self.proc, self.usb, self.selinux, self.run])
-        devices.sort(key=lambda d: getattr(d.format, "mountpoint", None))
+        devices.sort(key=lambda d: getattr(d.format, "mountpoint", ""))
         devices.reverse()
         for device in devices:
             if (not device.format.mountable) or \


-- 
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/0998f5e6305a2c19240a6f27f7a4e1c8ef1d66ba


More information about the anaconda-patches mailing list