1 |
On Mon, 6 Mar 2017 12:51:08 -0800 |
2 |
Zac Medico <zmedico@g.o> wrote: |
3 |
|
4 |
> Since it's possible for a URI to contain parenthesis, only call |
5 |
> missing_white_space_check for tokens that fail to validate with |
6 |
> token_class. The missing_white_space_check function only serves |
7 |
> to clarify exception messages, so it must not be allowed to |
8 |
> reject valid tokens. |
9 |
> --- |
10 |
> pym/portage/dep/__init__.py | 4 ++-- |
11 |
> 1 file changed, 2 insertions(+), 2 deletions(-) |
12 |
> |
13 |
> diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py |
14 |
> index 968ff5b..6ff6adc 100644 |
15 |
> --- a/pym/portage/dep/__init__.py |
16 |
> +++ b/pym/portage/dep/__init__.py |
17 |
> @@ -677,8 +677,6 @@ def use_reduce(depstr, uselist=[], masklist=[], |
18 |
> matchall=False, excludeall=[], i need_simple_token = True |
19 |
> stack[level].append(token) |
20 |
> else: |
21 |
> - missing_white_space_check(token, pos) |
22 |
> - |
23 |
> if need_bracket: |
24 |
> raise InvalidDependString( |
25 |
> _("expected: '(', got: '%s', |
26 |
> token %s") % (token, pos+1)) @@ -698,12 +696,14 @@ def |
27 |
> use_reduce(depstr, uselist=[], masklist=[], matchall=False, |
28 |
> excludeall=[], i token = token_class(token, eapi=eapi, |
29 |
> is_valid_flag=is_valid_flag) except InvalidAtom as e: |
30 |
> + |
31 |
> missing_white_space_check(token, pos) raise InvalidDependString( |
32 |
> _("Invalid |
33 |
> atom (%s), token %s") \ % (e, pos+1), errors=(e,)) |
34 |
> except SystemExit: |
35 |
> raise |
36 |
> except Exception as e: |
37 |
> + |
38 |
> missing_white_space_check(token, pos) raise InvalidDependString( |
39 |
> _("Invalid |
40 |
> token '%s', token %s") % (token, pos+1)) |
41 |
|
42 |
looks good :) |
43 |
|
44 |
-- |
45 |
Brian Dolbec <dolsen> |