# HG changeset patch # User Ludovic Chabant # Date 1509467616 25200 # Node ID d57fff79acc13266b39ffaa1364996c9cf37a29f # Parent ef224cce343c119fbbed00ff40d5b4f337b025c4 prepare: Fix a crash when preparing a new post. diff -r ef224cce343c -r d57fff79acc1 piecrust/sources/posts.py --- a/piecrust/sources/posts.py Tue Oct 31 09:29:14 2017 -0700 +++ b/piecrust/sources/posts.py Tue Oct 31 09:33:36 2017 -0700 @@ -154,8 +154,10 @@ def setupPrepareParser(self, parser, app): parser.add_argument( - '-d', '--date', help="The date of the post, " - "in `year/month/day` format (defaults to today).") + '-d', '--date', + default='today', + help=("The date of the post, in `year/month/day` format " + "(defaults to today).")) parser.add_argument('slug', help="The URL slug for the new post.") def createContent(self, args):