diff garcon/benchsite.py @ 990:22cf13b86cc3

cm: Upgrade Garcon tasks to the latest PyInvoke version.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 19 Nov 2017 14:29:52 -0800
parents 79aefe82c6b6
children
line wrap: on
line diff
--- a/garcon/benchsite.py	Sun Nov 19 14:29:17 2017 -0800
+++ b/garcon/benchsite.py	Sun Nov 19 14:29:52 2017 -0800
@@ -73,6 +73,11 @@
         if not os.path.isdir(posts_dir):
             os.makedirs(posts_dir)
 
+        config_path = os.path.join(self.out_dir, 'config.yml')
+        if not os.path.exists(config_path):
+            with open(config_path, 'w') as fp:
+                fp.write('\n')
+
     def writePost(self, post_info):
         out_dir = os.path.join(self.out_dir, 'posts')
         slug = post_info['slug']
@@ -220,7 +225,7 @@
     from invoke import task
 
     @task
-    def genbenchsite(engine, out_dir, post_count=100, tag_count=10):
+    def genbenchsite(ctx, engine, out_dir, post_count=100, tag_count=10):
         generate(engine, out_dir,
                  post_count=post_count,
                  tag_count=tag_count)