summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-10 05:16:11 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-10 05:16:11 +0000
commite40282011279ed59bc87c7ee3d1811a0cfcf19e2 (patch)
tree230f699d108105e16d4866154a33662865668bb9
parentaf493540045234678056ca045ea781ceadca3db1 (diff)
downloadportage-e40282011279ed59bc87c7ee3d1811a0cfcf19e2.tar.gz
portage-e40282011279ed59bc87c7ee3d1811a0cfcf19e2.tar.bz2
portage-e40282011279ed59bc87c7ee3d1811a0cfcf19e2.zip
Remove redundant conditional inside _src_uri_validate().
svn path=/main/trunk/; revision=12819
-rw-r--r--pym/portage/dbapi/porttree.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 8dcdf1b85..caff7f80f 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -69,15 +69,19 @@ def _src_uri_validate(cpv, eapi, src_uri):
if operator is None:
uri = x
continue
- if operator is not None:
- if "/" in x:
- raise portage.exception.InvalidDependString(
- ("getFetchMap(): '%s' SRC_URI '/' character in " + \
- "file name: '%s'") % (cpv, x))
- if x[-1:] == "?":
- raise portage.exception.InvalidDependString(
- ("getFetchMap(): '%s' SRC_URI arrow missing " + \
- "right operand") % (cpv,))
+
+ # This should be the right operand of an arrow operator.
+ if "/" in x:
+ raise portage.exception.InvalidDependString(
+ ("getFetchMap(): '%s' SRC_URI '/' character in " + \
+ "file name: '%s'") % (cpv, x))
+
+ if x[-1:] == "?":
+ raise portage.exception.InvalidDependString(
+ ("getFetchMap(): '%s' SRC_URI arrow missing " + \
+ "right operand") % (cpv,))
+
+ # Found the right operand, so reset state.
uri = None
operator = None