changeset 1089:a4d7ff2cdc5c

sources: Update prose source to correctly use the new source API.
author Ludovic Chabant <ludovic@chabant.com>
date Fri, 16 Feb 2018 00:14:27 -0800
parents c5f1936e9e89
children 2e269c02ab97
files piecrust/sources/prose.py
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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