aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2009-08-18 18:30:58 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2009-08-18 18:30:58 +0000
commit2994f4af55f304fcece1fb787b8113bae82dc7c4 (patch)
treed1466162d669a2c484592f58e5cf90a845790cc2 /web
parentWatch out for empty licenses. (diff)
downloadpackages-2994f4af55f304fcece1fb787b8113bae82dc7c4.tar.gz
packages-2994f4af55f304fcece1fb787b8113bae82dc7c4.tar.bz2
packages-2994f4af55f304fcece1fb787b8113bae82dc7c4.zip
Catch an error better.
Diffstat (limited to 'web')
-rw-r--r--web/model.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/web/model.py b/web/model.py
index 0810d18..6c64472 100644
--- a/web/model.py
+++ b/web/model.py
@@ -476,6 +476,8 @@ class PackageDB(object):
atom = CPV(str(cpvstr))
(cat, pn) = (atom.category, atom.package)
pkg_metadata = self.get_package_details(cat, pn)
+ if pkg_metadata is None:
+ raise Exception('No metadata available for %s/%s' % (cat, pn))
pkg = {}
pkg['atom'] = atom
pkg['meta'] = pkg_metadata