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

dwlehman installerbot-noreply at redhat.com
Thu Jun 25 15:26:45 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 1c63302..20b425c 100644
--- a/blivet/osinstall.py
+++ b/blivet/osinstall.py
@@ -605,7 +605,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/dd2a99fb508d974386dabb2adfb85894f8c36644


More information about the anaconda-patches mailing list