mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-31 16:36:20 +00:00
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
This commit is contained in:
parent
1190ce6143
commit
3ad08e6d2f
@ -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'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user