~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/translations/browser/potemplate.py

Merge with trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
# pylint: disable-msg=F0401
4
4
 
109
109
            # It's just a query, get a fake one so we don't create new
110
110
            # POFiles just because someone is browsing the web.
111
111
            language = getUtility(ILanguageSet).getLanguageByCode(name)
112
 
            return self.context.getDummyPOFile(language, requester=user,
113
 
                                               check_for_existing=False)
 
112
            if language is None:
 
113
                raise NotFoundError(name)
 
114
            return self.context.getDummyPOFile(
 
115
                language, requester=user, check_for_existing=False)
114
116
        else:
115
117
            # It's a POST.
116
118
            # XXX CarlosPerelloMarin 2006-04-20 bug=40275: We should