# HG changeset patch # User Ludovic Chabant # Date 1518768867 28800 # Node ID a4d7ff2cdc5cc42388e5ad8c16a5b7f4c4fd9820 # Parent c5f1936e9e89f8a8d7bc93a287904bc03d8c1b33 sources: Update prose source to correctly use the new source API. diff -r c5f1936e9e89 -r a4d7ff2cdc5c piecrust/sources/prose.py --- a/piecrust/sources/prose.py Thu Feb 15 23:46:37 2018 -0800 +++ b/piecrust/sources/prose.py Fri Feb 16 00:14:27 2018 -0800 @@ -13,8 +13,8 @@ super().__init__(app, name, config) self.config_recipe = config.get('config', {}) - def _doCreateItemMetadata(self, path): - metadata = super()._doCreateItemMetadata(path) + def _createItemMetadata(self, path): + metadata = super()._createItemMetadata(path) config = metadata.setdefault('config', {}) config.update(self._makeConfig(path)) return metadata @@ -29,12 +29,12 @@ def get_first_line(path): with open(path, 'r') as f: while True: - l = f.readline() - if not l: + line = f.readline() + if not line: break - l = l.strip() - if not l: + line = line.strip() + if not line: continue - return l + return line return None