Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
5c0be328
Kaydet (Commit)
5c0be328
authored
Haz 13, 2008
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
platform.uname now tries to fill empty values even when os.uname is present
üst
73e9ffc8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
33 deletions
+44
-33
platform.py
Lib/platform.py
+40
-33
ACKS
Misc/ACKS
+1
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/platform.py
Dosyayı görüntüle @
5c0be328
...
...
@@ -1090,23 +1090,30 @@ def uname():
"""
global
_uname_cache
no_os_uname
=
0
if
_uname_cache
is
not
None
:
return
_uname_cache
processor
=
''
# Get some infos from the builtin os.uname API...
try
:
system
,
node
,
release
,
version
,
machine
=
os
.
uname
()
except
AttributeError
:
# Hmm, no uname... we'll have to poke around the system then.
system
=
sys
.
platform
release
=
''
version
=
''
node
=
_node
()
machine
=
''
processor
=
''
use_syscmd_ver
=
1
no_os_uname
=
1
if
no_os_uname
or
not
filter
(
None
,
(
system
,
node
,
release
,
version
,
machine
)):
# 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
:
system
=
sys
.
platform
release
=
''
version
=
''
node
=
_node
()
machine
=
''
use_syscmd_ver
=
01
# Try win32_ver() on win32 platforms
if
system
==
'win32'
:
...
...
@@ -1117,8 +1124,10 @@ def uname():
# available on Win XP and later; see
# http://support.microsoft.com/kb/888731 and
# http://www.geocities.com/rick_lively/MANUALS/ENV/MSWIN/PROCESSI.HTM
machine
=
os
.
environ
.
get
(
'PROCESSOR_ARCHITECTURE'
,
''
)
processor
=
os
.
environ
.
get
(
'PROCESSOR_IDENTIFIER'
,
machine
)
if
not
machine
:
machine
=
os
.
environ
.
get
(
'PROCESSOR_ARCHITECTURE'
,
''
)
if
not
processor
:
processor
=
os
.
environ
.
get
(
'PROCESSOR_IDENTIFIER'
,
machine
)
# Try the 'ver' system command available on some
# platforms
...
...
@@ -1160,30 +1169,28 @@ def uname():
release
,(
version
,
stage
,
nonrel
),
machine
=
mac_ver
()
system
=
'MacOS'
else
:
# System specific extensions
if
system
==
'OpenVMS'
:
# OpenVMS seems to have release and version mixed up
if
not
release
or
release
==
'0'
:
release
=
version
version
=
''
# Get processor information
try
:
import
vms_lib
except
ImportError
:
pass
else
:
csid
,
cpu_number
=
vms_lib
.
getsyi
(
'SYI$_CPU'
,
0
)
if
(
cpu_number
>=
128
):
processor
=
'Alpha'
else
:
processor
=
'VAX'
# System specific extensions
if
system
==
'OpenVMS'
:
# OpenVMS seems to have release and version mixed up
if
not
release
or
release
==
'0'
:
release
=
version
version
=
''
# Get processor information
try
:
import
vms_lib
except
ImportError
:
pass
else
:
# Get processor information from the uname system command
processor
=
_syscmd_uname
(
'-p'
,
''
)
csid
,
cpu_number
=
vms_lib
.
getsyi
(
'SYI$_CPU'
,
0
)
if
(
cpu_number
>=
128
):
processor
=
'Alpha'
else
:
processor
=
'VAX'
if
not
processor
:
# Get processor information from the uname system command
processor
=
_syscmd_uname
(
'-p'
,
''
)
# 'unknown' is not really any useful as information; we'll convert
# it to '' which is more portable
#If any unknowns still exist, replace them with ''s, which are more portable
if
system
==
'unknown'
:
system
=
''
if
node
==
'unknown'
:
...
...
Misc/ACKS
Dosyayı görüntüle @
5c0be328
...
...
@@ -675,6 +675,7 @@ Steven Taschuk
Monty Taylor
Amy Taylor
Tobias Thelen
James Thomas
Robin Thomas
Eric Tiedemann
Tracy Tims
...
...
Misc/NEWS
Dosyayı görüntüle @
5c0be328
...
...
@@ -84,6 +84,9 @@ Extension Modules
Library
-------
- Issue #2912: platform.uname now tries to determine unknown information even if
os.uname exists.
- The rfc822 module has been deprecated for removal in 3.0.
- The mimetools module has been deprecated for removal in 3.0.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment