~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/urls/__init__.py

  • Committer: William Grant
  • Date: 2009-07-04 04:59:43 UTC
  • mto: (1294.4.2 ui-the-third)
  • mto: This revision was merged to the branch mainline in revision 1353.
  • Revision ID: grantw@unimelb.edu.au-20090704045943-k17df3rr97b85dp2
Raise more sensible NotFounds where multiple arguments are involved.

Show diffs side-by-side

added added

removed removed

Lines of Context:
276
276
 
277
277
            if argc is not INF and len(args) != argc:
278
278
                # There were too few path segments left. Die.
279
 
                raise InsufficientPathSegments(obj, lastseg, len(args))
280
 
 
281
 
            obj = route(obj, *args)
 
279
                raise InsufficientPathSegments(
 
280
                                obj,
 
281
                                tuple(args) if len(args) != 1 else args[0],
 
282
                                tuple(todo)
 
283
                                )
 
284
 
 
285
            newobj = route(obj, *args)
 
286
 
 
287
            if newobj is None:
 
288
                raise NotFound(obj, tuple(args) if len(args) != 1 else args[0],
 
289
                               tuple(todo))
 
290
 
 
291
            obj = newobj
282
292