From 0902b0b355ff95fe550d2231c71f9af7f7d9c09a Mon Sep 17 00:00:00 2001 From: fuzzyray Date: Mon, 18 Feb 2008 23:48:00 +0000 Subject: [PATCH] Fix equery list to not generate an internal portage error when fed input with too many slashes. (Bug 119806) svn path=/; revision=470 --- trunk/src/equery/equery | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/trunk/src/equery/equery b/trunk/src/equery/equery index 84e3dae..a8be5e3 100755 --- a/trunk/src/equery/equery +++ b/trunk/src/equery/equery @@ -1325,7 +1325,13 @@ class CmdListPackages(Command): cat = "" if query != "": - (cat, name, ver, rev) = gentoolkit.split_package_name(query) + try: (cat, name, ver, rev) = gentoolkit.split_package_name(query) + except ValueError, e: + if str(e) == 'too many values to unpack': + print_error("A pattern to match against package names was expected, ") + warn_msg = "but %s has too many slashes ('/') to match any package." + die (1, warn_msg % query) + else: raise ValueError(e) if rev == "r0": rev = "" package_finder = None -- 2.26.2