Visitar URL original
bpo-35967 resolve platform.processor late by jaraco · Pull Request #12239 · python/cpython · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use any for simpler code
  • Loading branch information
jaraco committed Mar 8, 2019
commit 5d93954c09351a8e1408e1cc783ced36208b90db
4 changes: 2 additions & 2 deletions Lib/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,11 +744,11 @@ def uname():

# Get some infos from the builtin os.uname API...
try:
system, node, release, version, machine = os.uname()
system, node, release, version, machine = infos = os.uname()
except AttributeError:
no_os_uname = 1

if no_os_uname or not list(filter(None, (system, node, release, version, machine))):
if no_os_uname or not any(infos):
# Hmm, no there is either no uname or uname has returned
#'unknowns'... we'll have to poke around the system then.
if no_os_uname:
Expand Down