From: W. Trevor King Date: Tue, 1 Jan 2013 13:26:02 +0000 (-0500) Subject: swc-installation-test-2.py: Use the more portable platform.uname() X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d250770efbe9931f77da59fd3d9cbbed1e37a859;p=swc-workshop.git swc-installation-test-2.py: Use the more portable platform.uname() From the docs [1,2]: platform.uname(): Fairly portable uname interface... Entries which cannot be determined are set to ''. os.uname(): ... Availability: recent flavors of Unix. [1]: http://docs.python.org/2/library/platform.html#platform.uname [2]: http://docs.python.org/2/library/os.html#os.uname --- diff --git a/swc-installation-test-2.py b/swc-installation-test-2.py index a1622ea..f0ec903 100755 --- a/swc-installation-test-2.py +++ b/swc-installation-test-2.py @@ -483,10 +483,7 @@ def print_system_info(): print('System information') print('==================') _print_info('os.name', _os.name) - try: - _print_info('os.uname', _os.uname()) - except: - pass + _print_info('os.uname', _platform.uname()) _print_info('platform', _sys.platform) _print_info('platform+', _platform.platform()) _print_info('prefix', _sys.prefix)