launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #17309
Re: [Merge] lp:~cjohnston/launchpad/ppa-rtm-fixes into lp:launchpad
Diff comments:
> === modified file 'lib/lp/soyuz/vocabularies.py'
> --- lib/lp/soyuz/vocabularies.py 2013-09-10 06:28:26 +0000
> +++ lib/lp/soyuz/vocabularies.py 2014-08-06 13:09:27 +0000
> @@ -101,14 +101,17 @@
> else:
> summary = "No description available"
>
> - token = '%s/%s' % (archive.owner.name, archive.name)
> + token = '%s' % (archive.reference)
"'%s' % str" is pointless.
>
> return SimpleTerm(archive, token, summary)
>
> def getTermByToken(self, token):
> """See `IVocabularyTokenized`."""
> try:
> - owner_name, archive_name = token.split('/')
> + if len(token.split('/')) == 3:
> + owner_name, distro_name, archive_name = token.split('/')
> + else:
> + owner_name, archive_name = token.split('/')
The token always matches Archive.reference exactly, including the leading ~ for PPAs.
> except ValueError:
> raise LookupError(token)
>
> @@ -136,7 +139,10 @@
> query = query.lower()
>
> try:
> - owner_name, archive_name = query.split('/')
> + if len(query.split('/')) == 3:
> + owner_name, distro_name, archive_name = query.split('/')
> + else:
> + owner_name, archive_name = query.split('/')
You need only do the split once.
> except ValueError:
> clause = And(
> self._filter,
>
--
https://code.launchpad.net/~cjohnston/launchpad/ppa-rtm-fixes/+merge/229777
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjohnston/launchpad/ppa-rtm-fixes into lp:launchpad.