# HG changeset patch # User Ludovic Chabant # Date 1437543725 25200 # Node ID cce911be024da86384501ba069ccf388f2949f51 # Parent aa686b8fbfd0e94ac0a20c41fa4136489bd9b880 serve: Fix a crash when matching taxonomy URLs with incorrect URLs. This is still around code that should have been fixed a while ago but hey, consider this a growing TODO. diff -r aa686b8fbfd0 -r cce911be024d piecrust/routing.py --- a/piecrust/routing.py Tue Jul 21 22:17:06 2015 -0700 +++ b/piecrust/routing.py Tue Jul 21 22:42:05 2015 -0700 @@ -135,7 +135,10 @@ # TODO: fix this hard-coded shit for key in ['year', 'month', 'day']: if key in route_metadata and isinstance(route_metadata[key], str): - route_metadata[key] = int(route_metadata[key]) + try: + route_metadata[key] = int(route_metadata[key]) + except ValueError: + pass return route_metadata