From 78e6f6b713ce7941980143c1e2b63aa845659a21 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 6 Aug 2009 21:47:56 +0000 Subject: Add a new portage.util.shlex_split() function to wrap all shlex.split() calls, since shlex.split() doesn't behave well with unicode strings. svn path=/main/trunk/; revision=13939 --- pym/repoman/utilities.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'pym/repoman') diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py index 6003deeac..9ea5ff467 100644 --- a/pym/repoman/utilities.py +++ b/pym/repoman/utilities.py @@ -238,7 +238,7 @@ def format_qa_output(formatter, stats, fails, dofull, dofail, options, qawarning def editor_is_executable(editor): """ Given an EDITOR string, validate that it refers to - an executable. This uses shlex.split() to split the + an executable. This uses shlex_split() to split the first component and do a PATH lookup if necessary. @param editor: An EDITOR value from the environment. @@ -246,8 +246,7 @@ def editor_is_executable(editor): @rtype: bool @returns: True if an executable is found, False otherwise. """ - import shlex - editor_split = shlex.split(editor) + editor_split = util.shlex_split(editor) if not editor_split: return False filename = editor_split[0] -- cgit v1.2.3-1-g7c22