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

[PATCH] formatByDefault: Don't traceback when mountpoint is None (#522609)



Don't traceback in formatByDefault() when a device with a mountable
format has a mountpoint of None. Instead simply assume that if we don't
mount it anywhere it does not need to be formatted.
---
 storage/__init__.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index ef39277..0f71d3c 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -722,6 +722,9 @@ class Storage(object):
             return False
 
         if device.format.mountable:
+            if not device.format.mountpoint:
+                return False
+
             if device.format.mountpoint == "/" or \
                device.format.mountpoint in formatlist:
                 return True
-- 
1.6.5.rc2


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