[master 1/1] Don't fail in storage.py:isNameValid when name is None

alexanderlaw installerbot-noreply at redhat.com
Thu Jun 18 11:00:10 UTC 2015


From: Alexander Lakhin <exclusion at gmail.com>

---
 blivet/devices/storage.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/blivet/devices/storage.py b/blivet/devices/storage.py
index cf590cf..ac74853 100644
--- a/blivet/devices/storage.py
+++ b/blivet/devices/storage.py
@@ -745,6 +745,8 @@ def isNameValid(cls, name):
         # ...except some names *do* contain directory components, for this
         # is an imperfect world of joy and sorrow mingled. For cciss, split
         # the path into its components and do the real check on each piece
+        if name is None:
+            return False
         if name.startswith("cciss/"):
             return all(cls.isNameValid(n) for n in name.split('/'))
 


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


More information about the anaconda-patches mailing list