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
da6c3da6
Kaydet (Commit)
da6c3da6
authored
Şub 13, 2018
tarafından
Segev Finer
Kaydeden (comit)
Serhiy Storchaka
Şub 13, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-32370: Use the correct encoding for ipconfig output in the uuid module. (GH-5608)
üst
b7e2d67f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
uuid.py
Lib/uuid.py
+6
-4
2018-02-10-15-38-19.bpo-32370.kcKuct.rst
...S.d/next/Windows/2018-02-10-15-38-19.bpo-32370.kcKuct.rst
+2
-0
No files found.
Lib/uuid.py
Dosyayı görüntüle @
da6c3da6
...
@@ -468,7 +468,7 @@ def _netstat_getnode():
...
@@ -468,7 +468,7 @@ def _netstat_getnode():
def
_ipconfig_getnode
():
def
_ipconfig_getnode
():
"""Get the hardware address on Windows by running ipconfig.exe."""
"""Get the hardware address on Windows by running ipconfig.exe."""
import
os
,
re
import
os
,
re
,
subprocess
first_local_mac
=
None
first_local_mac
=
None
dirs
=
[
''
,
r'c:\windows\system32'
,
r'c:\winnt\system32'
]
dirs
=
[
''
,
r'c:\windows\system32'
,
r'c:\winnt\system32'
]
try
:
try
:
...
@@ -480,11 +480,13 @@ def _ipconfig_getnode():
...
@@ -480,11 +480,13 @@ def _ipconfig_getnode():
pass
pass
for
dir
in
dirs
:
for
dir
in
dirs
:
try
:
try
:
pipe
=
os
.
popen
(
os
.
path
.
join
(
dir
,
'ipconfig'
)
+
' /all'
)
proc
=
subprocess
.
Popen
([
os
.
path
.
join
(
dir
,
'ipconfig'
),
'/all'
],
stdout
=
subprocess
.
PIPE
,
encoding
=
"oem"
)
except
OSError
:
except
OSError
:
continue
continue
with
p
ipe
:
with
p
roc
:
for
line
in
p
ipe
:
for
line
in
p
roc
.
stdout
:
value
=
line
.
split
(
':'
)[
-
1
]
.
strip
()
.
lower
()
value
=
line
.
split
(
':'
)[
-
1
]
.
strip
()
.
lower
()
if
re
.
match
(
'([0-9a-f][0-9a-f]-){5}[0-9a-f][0-9a-f]'
,
value
):
if
re
.
match
(
'([0-9a-f][0-9a-f]-){5}[0-9a-f][0-9a-f]'
,
value
):
mac
=
int
(
value
.
replace
(
'-'
,
''
),
16
)
mac
=
int
(
value
.
replace
(
'-'
,
''
),
16
)
...
...
Misc/NEWS.d/next/Windows/2018-02-10-15-38-19.bpo-32370.kcKuct.rst
0 → 100644
Dosyayı görüntüle @
da6c3da6
Use the correct encoding for ipconfig output in the uuid module.
Patch by Segev Finer.
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