BUGFIX: list.reverse() is in place, does not return a value
diff --git a/planetstack/observer/toposort.py b/planetstack/observer/toposort.py
index bfedee9..959cea3 100755
--- a/planetstack/observer/toposort.py
+++ b/planetstack/observer/toposort.py
@@ -36,8 +36,9 @@
if (not v):
sources.append(k)
- rev_order = []
+ order = []
marked = []
+
while sources:
n = sources.pop(0)
try:
@@ -48,8 +49,9 @@
except KeyError:
pass
if (n in steps):
- rev_order.append(n)
- order = rev_order.reverse()
+ order.append(n)
+
+ order.reverse()
return order