~lutostag/ubuntu/trusty/maas/1.5.2+packagefix

« back to all changes in this revision

Viewing changes to src/maasserver/apidoc.py

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2014-03-28 10:43:53 UTC
  • mto: This revision was merged to the branch mainline in revision 57.
  • Revision ID: package-import@ubuntu.com-20140328104353-ekpolg0pm5xnvq2s
Tags: upstream-1.5+bzr2204
ImportĀ upstreamĀ versionĀ 1.5+bzr2204

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
    :return: Generates :class:`piston.doc.HandlerDocumentation` instances.
79
79
    """
80
80
    sentinel = object()
81
 
    for resource in resources:
 
81
    resource_key = (
 
82
        lambda resource: resource.handler.__class__.__name__)
 
83
    for resource in sorted(resources, key=resource_key):
82
84
        handler = type(resource.handler)
83
85
        if getattr(handler, "resource_uri", sentinel) is sentinel:
84
86
            raise AssertionError(