[Pypi-checkins] r819 - trunk/pypi
richard
python-checkins at python.org
Sun Jul 25 09:48:29 CEST 2010
Author: richard
Date: Sun Jul 25 09:48:29 2010
New Revision: 819
Modified:
trunk/pypi/webui.py
Log:
suboptimal but better than an exception perculating through
Modified: trunk/pypi/webui.py
==============================================================================
--- trunk/pypi/webui.py (original)
+++ trunk/pypi/webui.py Sun Jul 25 09:48:29 2010
@@ -970,7 +970,11 @@
def doap(self, name=None, version=None):
'''Return DOAP rendering of a package.
'''
- info, latest_version = self._load_release_info(name, version)
+ try:
+ info, latest_version = self._load_release_info(name, version)
+ except MultipleReleases, e:
+ return self.index(releases=e.releases)
+
name = info['name']
root = cElementTree.Element('rdf:RDF', {
@@ -1043,7 +1047,10 @@
def json(self, name=None, version=None):
'''Return DOAP rendering of a package.
'''
- info, latest_version = self._load_release_info(name, version)
+ try:
+ info, latest_version = self._load_release_info(name, version)
+ except MultipleReleases, e:
+ return self.index(releases=e.releases)
name, version = info['name'], info['version']
d = {
'info': rpc.release_data(self.store, name, version),
More information about the Pypi-checkins
mailing list