Mercurial > piecrust2
comparison piecrust/sources/autoconfig.py @ 505:883a5544cd7f
bug: Fix a crash with the `ordered` page source when sorting pages.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 25 Jul 2015 00:48:25 -0700 |
parents | dd25bd3ce1f9 |
children | 58ebf50235a5 |
comparison
equal
deleted
inserted
replaced
504:20fcadaaf871 | 505:883a5544cd7f |
---|---|
332 def __iter__(self): | 332 def __iter__(self): |
333 return iter(sorted(self.it, key=self._key_getter)) | 333 return iter(sorted(self.it, key=self._key_getter)) |
334 | 334 |
335 def _key_getter(self, item): | 335 def _key_getter(self, item): |
336 values = self.value_accessor(item, self.trail_name) | 336 values = self.value_accessor(item, self.trail_name) |
337 key = ''.join(values) | 337 key = ''.join(map(lambda v: str(v), values)) |
338 return key | 338 return key |
339 | 339 |