# HG changeset patch # User Ludovic Chabant # Date 1507188236 25200 # Node ID 23052bf8a62b36f180705b25e8055b5ed7f7efa4 # Parent b61dd60aff36ff53fb09bd63cf6550f99a56d7e1 sources: Change argument name in default source's `createContent`. This is so it's compatible with the interactive fields' argument names. diff -r b61dd60aff36 -r 23052bf8a62b piecrust/sources/default.py --- a/piecrust/sources/default.py Thu Oct 05 00:22:53 2017 -0700 +++ b/piecrust/sources/default.py Thu Oct 05 00:23:56 2017 -0700 @@ -93,13 +93,13 @@ return ContentItem(path, metadata) def setupPrepareParser(self, parser, app): - parser.add_argument('uri', help='The URI for the new page.') + parser.add_argument('slug', help='The slug for the new page.') def createContent(self, args): - uri = args.get('uri') - if not uri: - uri = '_index' - path = os.path.join(self.fs_endpoint_path, uri) + slug = args.get('slug') + if not slug: + slug = '_index' + path = os.path.join(self.fs_endpoint_path, slug) _, ext = os.path.splitext(path) if ext == '': path = '%s.%s' % (path, self.default_auto_format)