From: david-sarah Date: Tue, 8 Jun 2010 00:45:23 +0000 (-0700) Subject: show-tool-versions.py: platform.linux_distribution() is not always available X-Git-Url: https://git.rkrishnan.org/maximilian?a=commitdiff_plain;h=5adc1d789de770656d0cbecdd31d8af1afb38ea1;p=tahoe-lafs%2Ftahoe-lafs.git show-tool-versions.py: platform.linux_distribution() is not always available --- 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