From 3ad08e6d2f7362cf7c5d7a6ccf54332de42d0f96 Mon Sep 17 00:00:00 2001 From: david-sarah Date: Sun, 2 Jan 2011 17:51:44 -0800 Subject: [PATCH] misc/build_helpers/show-tool-versions.py: remove attempts to show stdout.encoding and stderr.encoding that always printed None due to redirection. Also remove code to show os.path.supports_unicode_filenames which is not useful. refs #1251 --- misc/build_helpers/show-tool-versions.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/misc/build_helpers/show-tool-versions.py b/misc/build_helpers/show-tool-versions.py index 3c91c25d..dedc3d98 100644 --- a/misc/build_helpers/show-tool-versions.py +++ b/misc/build_helpers/show-tool-versions.py @@ -38,12 +38,9 @@ def print_python_ver(): print 'maxunicode: ' + str(sys.maxunicode) def print_python_encoding_settings(): - print_stderr([sys.executable, '-c', 'import sys; print >>sys.stderr, sys.stdout.encoding'], label='sys.stdout.encoding') - print_stdout([sys.executable, '-c', 'import sys; print sys.stderr.encoding'], label='sys.stderr.encoding') print print 'filesystem.encoding: ' + str(sys.getfilesystemencoding()) print 'locale.getpreferredencoding: ' + str(locale.getpreferredencoding()) - print 'os.path.supports_unicode_filenames: ' + str(os.path.supports_unicode_filenames) try: print 'locale.defaultlocale: ' + str(locale.getdefaultlocale()) except ValueError, e: @@ -64,20 +61,6 @@ def print_stdout(cmdlist, label=None): sys.stderr.flush() pass -def print_stderr(cmdlist, label=None): - print - try: - res = subprocess.Popen(cmdlist, stdin=open(os.devnull), - stderr=subprocess.PIPE).communicate()[1] - if label is None: - label = cmdlist[0] - print label + ': ' + foldlines(res) - except EnvironmentError: - sys.stderr.write("\nGot exception invoking '%s'. Exception follows\n" % (cmdlist[0],)) - traceback.print_exc(file=sys.stderr) - sys.stderr.flush() - pass - def print_as_ver(): print if os.path.exists('a.out'): -- 2.45.2