From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CA179139694 for ; Wed, 8 Mar 2017 19:30:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 339CBE0C94; Wed, 8 Mar 2017 19:30:58 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 01663E0C94 for ; Wed, 8 Mar 2017 19:30:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DFAC934169F for ; Wed, 8 Mar 2017 19:30:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7B5AB615D for ; Wed, 8 Mar 2017 19:30:55 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1489001363.c4447175e57a8311f254cfc9fa32646467e1830f.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dep/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/dep/__init__.py X-VCS-Directories: pym/portage/dep/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: c4447175e57a8311f254cfc9fa32646467e1830f X-VCS-Branch: master Date: Wed, 8 Mar 2017 19:30:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3adf8efd-6514-4a4f-bdd6-a03fd50ef6f9 X-Archives-Hash: d3c4e0dc728ee4a3341b027b8d759ee8 commit: c4447175e57a8311f254cfc9fa32646467e1830f Author: Zac Medico gentoo org> AuthorDate: Mon Mar 6 19:51:38 2017 +0000 Commit: Zac Medico gentoo org> CommitDate: Wed Mar 8 19:29:23 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c4447175 use_reduce: reserve missing_white_space_check for invalid tokens (bug 611838) Since it's possible for a URI to contain parenthesis, only call missing_white_space_check for tokens that fail to validate with token_class. The missing_white_space_check function only serves to clarify exception messages, so it must not be allowed to reject valid tokens. X-Gentoo-Bug: 611838 X-Gentoo-Bug-Url: https://bugs.gentoo.org/show_bug.cgi?id=611838 Acked-by: Brian Dolbec gentoo.org> pym/portage/dep/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py index 968ff5b89..6ff6adcb9 100644 --- a/pym/portage/dep/__init__.py +++ b/pym/portage/dep/__init__.py @@ -677,8 +677,6 @@ def use_reduce(depstr, uselist=[], masklist=[], matchall=False, excludeall=[], i need_simple_token = True stack[level].append(token) else: - missing_white_space_check(token, pos) - if need_bracket: raise InvalidDependString( _("expected: '(', got: '%s', token %s") % (token, pos+1)) @@ -698,12 +696,14 @@ def use_reduce(depstr, uselist=[], masklist=[], matchall=False, excludeall=[], i token = token_class(token, eapi=eapi, is_valid_flag=is_valid_flag) except InvalidAtom as e: + missing_white_space_check(token, pos) raise InvalidDependString( _("Invalid atom (%s), token %s") \ % (e, pos+1), errors=(e,)) except SystemExit: raise except Exception as e: + missing_white_space_check(token, pos) raise InvalidDependString( _("Invalid token '%s', token %s") % (token, pos+1))