From 5adc1d789de770656d0cbecdd31d8af1afb38ea1 Mon Sep 17 00:00:00 2001 From: david-sarah Date: Mon, 7 Jun 2010 17:45:23 -0700 Subject: [PATCH] show-tool-versions.py: platform.linux_distribution() is not always available --- misc/build_helpers/show-tool-versions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/misc/build_helpers/show-tool-versions.py b/misc/build_helpers/show-tool-versions.py index 68e2b7c3..a6c70f83 100644 --- a/misc/build_helpers/show-tool-versions.py +++ b/misc/build_helpers/show-tool-versions.py @@ -8,7 +8,8 @@ def print_platform(): out = platform.platform() print print "platform:", out.replace("\n", " ") - print ', linux_distribution:', repr(platform.linux_distribution()) + if hasattr(platform, 'linux_distribution'): + print "linux_distribution:", repr(platform.linux_distribution()) except EnvironmentError, le: sys.stderr.write("Got exception using 'platform': %s\n" % (le,)) pass -- 2.45.2