Merge lp:~james-w/wadllib/fix-bind-to-anon-collection into lp:wadllib

Proposed by James Westby
Status: Merged
Merged at revision: 16
Proposed branch: lp:~james-w/wadllib/fix-bind-to-anon-collection
Merge into: lp:wadllib
Diff against target: 17 lines (+3/-3)
1 file modified
src/wadllib/application.py (+3/-3)
To merge this branch: bzr merge lp:~james-w/wadllib/fix-bind-to-anon-collection
Reviewer Review Type Date Requested Status
LAZR Developers Pending
Review via email: mp+24061@code.launchpad.net

Description of the change

Hi,

This is an attempt to fix bug 274074 by changing the code to match
the docstring.

Help writing a testcase for it would be appreciated.

Thanks,

James

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/wadllib/application.py'
2--- src/wadllib/application.py 2009-09-15 16:46:51 +0000
3+++ src/wadllib/application.py 2010-04-24 12:44:25 +0000
4@@ -522,10 +522,10 @@
5
6 :return: A RepresentationDefinition
7 """
8- if media_type is not None:
9+ if self.representation is not None:
10+ definition = self.representation_definition.resolve_definition()
11+ elif media_type is not None:
12 definition = self.get_representation_definition(media_type)
13- elif self.representation is not None:
14- definition = self.representation_definition.resolve_definition()
15 else:
16 raise NoBoundRepresentationError(
17 "Resource is not bound to any representation, and no media "

Subscribers

People subscribed via source and target branches