Implement licenses.get_license_by_url
authorSebastian Spaeth <Sebastian@SSpaeth.de>
Mon, 26 Nov 2012 13:55:33 +0000 (14:55 +0100)
committerSebastian Spaeth <Sebastian@SSpaeth.de>
Fri, 30 Nov 2012 13:31:43 +0000 (14:31 +0100)
commit138a18fd6ed18b7415bc3bdcf9c0300c3d6a8c85
treeb9ec8486b8807383a810ddd2a010d727ec79aded
parent8e5fae9b437afced1f8b55a44565c5032b8e7424
Implement licenses.get_license_by_url

Rather than exploding in the user's face (for example if we custom-configure
licenses in our MG instance, and there are still media with now "unknown"
licenses in the db), simply return a License object as a fallback, where all
attributes are set to the URL we were handed.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
mediagoblin/db/mixin.py
mediagoblin/tools/licenses.py