In 'get_platform()', handle so-called POSIX systems that don't have

'uname()' -- specifically NeXTSTEP.
This commit is contained in:
Greg Ward 2000-09-30 17:09:39 +00:00
parent 64d855adca
commit ec84c21ce2

View file

@ -31,7 +31,7 @@ def get_platform ():
For non-POSIX platforms, currently just returns 'sys.platform'.
"""
if os.name != "posix":
if os.name != "posix" or not hasattr(os, 'uname'):
# XXX what about the architecture? NT is Intel or Alpha,
# Mac OS is M68k or PPC, etc.
return sys.platform