[Yum-devel] [PATCH] Catch shlex.split() exceptions. BZ 819751.
Zdeněk Pavlas
zpavlas at redhat.com
Wed May 9 10:52:23 UTC 2012
---
completion-helper.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/completion-helper.py b/completion-helper.py
index 405ceab..0e4b96b 100755
--- a/completion-helper.py
+++ b/completion-helper.py
@@ -64,7 +64,8 @@ class RepoListCompletionCommand(yumcommands.RepoListCommand):
def get_pattern(extcmds):
if len(extcmds) > 1 and extcmds[-1]:
- return shlex.split(extcmds[-1])[0] + "*"
+ try: return shlex.split(extcmds[-1])[0] + "*"
+ except ValueError: pass
return "*"
def main(args):
--
1.7.4.4
More information about the Yum-devel
mailing list