Sort recipe files when loading Cookbook
authorW. Trevor King <wking@drexel.edu>
Fri, 23 Jul 2010 19:11:48 +0000 (15:11 -0400)
committerW. Trevor King <wking@drexel.edu>
Fri, 23 Jul 2010 19:11:48 +0000 (15:11 -0400)
cookbook/cookbook.py

index b95e576b2d113f2c0b52c1df2adac06c1b565eb5..fdfae2c5053cf216e000e3de9d7b8bbd564e3c52 100644 (file)
@@ -526,7 +526,7 @@ class Cookbook (list):
                 recipe.save(f, p)
 
     def load(self):
-        for path in os.listdir(self.save_dir):
+        for path in sorted(os.listdir(self.save_dir)):
             r = Recipe()
             p = os.path.join(self.save_dir, path)
             with open(p, 'r') as f: