Mercurial > piecrust2
comparison piecrust/routing.py @ 734:3f01f63b7247
routing: Correctly call the underlying route template function from a merged one.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 01 Jun 2016 22:19:01 -0700 |
parents | 8c3c2b949b82 |
children | f6f9a284a5f3 |
comparison
equal
deleted
inserted
replaced
733:40aaec6d1d85 | 734:3f01f63b7247 |
---|---|
359 | 359 |
360 if len(args) == len(self._arg_names) + 1: | 360 if len(args) == len(self._arg_names) + 1: |
361 f_args = args[:-1] | 361 f_args = args[:-1] |
362 for r, f in self._funcs: | 362 for r, f in self._funcs: |
363 if r.source_name == args[-1]: | 363 if r.source_name == args[-1]: |
364 return f(f_args, **kwargs) | 364 return f(*f_args, **kwargs) |
365 raise Exception("No such source: %s" % args[-1]) | 365 raise Exception("No such source: %s" % args[-1]) |
366 | 366 |
367 raise Exception("Incorrect number of arguments for route function. " | 367 raise Exception("Incorrect number of arguments for route function. " |
368 "Expected '%s', got '%s'" % (self._arg_names, args)) | 368 "Expected '%s', got '%s'" % (self._arg_names, args)) |
369 | 369 |