[PATCH 5/6] Don't traceback when the action list is empty. (#657891)

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

 



---
 pyanaconda/storage/devicetree.py |    3 +++
 pyanaconda/tsort.py              |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index 1fcfc80..6b6b3e1 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -217,6 +217,9 @@ class DeviceTree(object):
 
     def sortActions(self):
         """ Sort actions based on dependencies. """
+        if not self._actions:
+            return
+
         edges = []
 
         # collect all ordering requirements for the actions
diff --git a/pyanaconda/tsort.py b/pyanaconda/tsort.py
index 5c6213c..52a871f 100644
--- a/pyanaconda/tsort.py
+++ b/pyanaconda/tsort.py
@@ -27,6 +27,9 @@ class CyclicGraphError(Exception):
 def tsort(graph):
     order = []  # sorted list of items
 
+    if not graph or not graph['items']:
+        return order
+
     # determine which nodes have no incoming edges
     roots = [n for n in graph['items'] if graph['incoming'][n] == 0]
     if not roots:
-- 
1.7.2.3

_______________________________________________
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