From: W. Trevor King Date: Wed, 18 Aug 2010 00:41:10 +0000 (-0400) Subject: Sort cookbook after adding a new recipe. X-Git-Tag: v0.1~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1c8876a3f408bb5ad8b0484008be97321c59f211;p=cookbook.git Sort cookbook after adding a new recipe. --- diff --git a/cookbook/server.py b/cookbook/server.py index e62dd84..e94e769 100644 --- a/cookbook/server.py +++ b/cookbook/server.py @@ -165,6 +165,7 @@ class Server (object): print 'new' self.cookbook.append(recipe) self.cookbook.make_index() + self.cookbook.sort(key=lambda r: r.path) elif name != recipe.name: # renamed recipe print 'rename' os.remove(recipe.path)