diff options
| author | fuzzyray <fuzzyray@gentoo.org> | 2007-03-15 03:33:44 +0000 |
|---|---|---|
| committer | fuzzyray <fuzzyray@gentoo.org> | 2007-03-15 03:33:44 +0000 |
| commit | ba067555765ae15efc7d4b84e24f7a1876568016 (patch) | |
| tree | af0fbb335441252365362b8e8a544408173ae748 /trunk/src/equery | |
| parent | 22abb2a3c0108770f12cb83d4625a8a5858a20c7 (diff) | |
| download | gentoolkit-ba067555765ae15efc7d4b84e24f7a1876568016.tar.gz | |
Trim trailing slash from query for equery belongs command (Bug #170981)
svn path=/; revision=357
Diffstat (limited to 'trunk/src/equery')
| -rwxr-xr-x | trunk/src/equery/equery | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/trunk/src/equery/equery b/trunk/src/equery/equery index bf2c019..c6ab4c9 100755 --- a/trunk/src/equery/equery +++ b/trunk/src/equery/equery @@ -359,6 +359,10 @@ class CmdListBelongs(Command): if opts["fullRegex"]: q = query else: + # Trim trailing slash from query + for i in range(0, len(query)): + if (query[i][-1] == "/"): + query[i] = query[i][:-1] q = map(lambda x: ((len(x) and x[0] == "/") and "^" or "/") + re.escape(x) + "$", query) try: |
