From: W. Trevor King Date: Fri, 23 Jul 2010 19:11:48 +0000 (-0400) Subject: Sort recipe files when loading Cookbook X-Git-Tag: v0.1~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d9e74b2ce8bff977766bbbddf5457b1a087beebb;p=cookbook.git Sort recipe files when loading Cookbook --- diff --git a/cookbook/cookbook.py b/cookbook/cookbook.py index b95e576..fdfae2c 100644 --- a/cookbook/cookbook.py +++ b/cookbook/cookbook.py @@ -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: