diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-03-10 05:04:33 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-03-10 05:04:33 +0000 |
commit | af493540045234678056ca045ea781ceadca3db1 (patch) | |
tree | 3aba7f37654278666ee240f063fc81f4e3851392 /pym/portage/dbapi/porttree.py | |
parent | 308daa12820bb4b41c5bcb097da1763a2867518c (diff) | |
download | portage-af493540045234678056ca045ea781ceadca3db1.tar.gz portage-af493540045234678056ca045ea781ceadca3db1.tar.bz2 portage-af493540045234678056ca045ea781ceadca3db1.zip |
Fix incorrect slice inside _src_uri_validate() and add new test case.
svn path=/main/trunk/; revision=12818
Diffstat (limited to 'pym/portage/dbapi/porttree.py')
-rw-r--r-- | pym/portage/dbapi/porttree.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index 57bdd9984..8dcdf1b85 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -45,7 +45,7 @@ def _src_uri_validate(cpv, eapi, src_uri): uri = None _src_uri_validate(cpv, eapi, x) continue - if x[:-1] == "?": + if x[-1:] == "?": if operator is not None: raise portage.exception.InvalidDependString( ("getFetchMap(): '%s' SRC_URI arrow missing " + \ @@ -74,7 +74,7 @@ def _src_uri_validate(cpv, eapi, src_uri): raise portage.exception.InvalidDependString( ("getFetchMap(): '%s' SRC_URI '/' character in " + \ "file name: '%s'") % (cpv, x)) - if x[-1] == "?": + if x[-1:] == "?": raise portage.exception.InvalidDependString( ("getFetchMap(): '%s' SRC_URI arrow missing " + \ "right operand") % (cpv,)) |