Mercurial > piecrust2
comparison piecrust/sources/posts.py @ 95:cb6eadea0845
Fixed a bug with the `shallow` source. Add unit tests.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 07 Sep 2014 21:37:10 -0700 |
parents | b3ce11b2cf36 |
children | d74ae33832ae |
comparison
equal
deleted
inserted
replaced
94:b536022078a2 | 95:cb6eadea0845 |
---|---|
203 "Is that a typo?") | 203 "Is that a typo?") |
204 continue | 204 continue |
205 year = int(yd) | 205 year = int(yd) |
206 year_dir = os.path.join(self.fs_endpoint_path, yd) | 206 year_dir = os.path.join(self.fs_endpoint_path, yd) |
207 | 207 |
208 _, __, filenames = os.walk(year_dir) | 208 _, __, filenames = next(os.walk(year_dir)) |
209 for f in filenames: | 209 for f in filenames: |
210 match = file_pattern.match(f) | 210 match = file_pattern.match(f) |
211 if match is None: | 211 if match is None: |
212 name, ext = os.path.splitext(f) | 212 name, ext = os.path.splitext(f) |
213 logger.warning("'%s' is not formatted as 'MM-DD_slug-title.%s' " | 213 logger.warning("'%s' is not formatted as 'MM-DD_slug-title.%s' " |