From 725982cc5b9151ad1ccc83c7ebe330028e00710e Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 15 Apr 2012 19:45:44 -0700 Subject: [PATCH] Fix to try to remove Python 2.7 dependency --- share/tools/create_manpage_completions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/share/tools/create_manpage_completions.py b/share/tools/create_manpage_completions.py index 1255bf971..19f60bdac 100755 --- a/share/tools/create_manpage_completions.py +++ b/share/tools/create_manpage_completions.py @@ -770,8 +770,9 @@ def parse_and_output_man_pages(paths, output_directory, show_progress): def get_paths_from_manpath(): # Return all the paths to man(1) files in the manpath import subprocess, os - manpath = subprocess.check_output(['man', '--path']).strip() - parent_paths = manpath.split(':') + proc = subprocess.Popen(['man', '--path'], stdout=subprocess.PIPE) + manpath, err_data = proc.communicate() + parent_paths = manpath.strip().split(':') if not parent_paths: print >> sys.stderr, "Unable to get the manpath (tried man --path)" sys.exit(-1)