瀏覽代碼

Add key to sort

Yentl Van Tendeloo 7 年之前
父節點
當前提交
428dbfd5bd
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/pypdevs/solver.py

+ 1 - 1
src/pypdevs/solver.py

@@ -255,7 +255,7 @@ class Solver(object):
         # self.transitioning are the models that must transition
         if len(imminent) > 1:
             # Perform all selects
-            imminent.sort()
+            imminent.sort(key=lambda i: i.getModelFullName())
             pending = imminent
             level = 1
             while len(pending) > 1: