From: david-sarah Date: Mon, 3 Jan 2011 01:51:44 +0000 (-0800) Subject: misc/build_helpers/show-tool-versions.py: remove attempts to show stdout.encoding... X-Git-Tag: allmydata-tahoe-1.8.2b1~80 X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/priv.html?a=commitdiff_plain;h=3ad08e6d2f7362cf7c5d7a6ccf54332de42d0f96;p=tahoe-lafs%2Ftahoe-lafs.git 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 --- 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'):