FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 12-02-2010, 05:34 PM
David Lehman
 
Default Don't traceback when the action list is empty. (#657891)

---
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@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 12:57 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org