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
3ef3bcbe
Kaydet (Commit)
3ef3bcbe
authored
Haz 01, 2017
tarafından
Xiang Zhang
Kaydeden (comit)
GitHub
Haz 01, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses (#1904) (#1676)
üst
662d856c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
6 deletions
+24
-6
handlers.py
Lib/logging/handlers.py
+21
-6
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/logging/handlers.py
Dosyayı görüntüle @
3ef3bcbe
...
...
@@ -760,14 +760,29 @@ class SysLogHandler(logging.Handler):
self
.
unixsocket
=
1
self
.
_connect_unixsocket
(
address
)
else
:
self
.
unixsocket
=
0
self
.
unixsocket
=
False
if
socktype
is
None
:
socktype
=
socket
.
SOCK_DGRAM
self
.
socket
=
socket
.
socket
(
socket
.
AF_INET
,
socktype
)
if
socktype
==
socket
.
SOCK_STREAM
:
self
.
socket
.
connect
(
address
)
host
,
port
=
address
ress
=
socket
.
getaddrinfo
(
host
,
port
,
0
,
socktype
)
if
not
ress
:
raise
socket
.
error
(
"getaddrinfo returns an empty list"
)
for
res
in
ress
:
af
,
socktype
,
proto
,
_
,
sa
=
res
err
=
sock
=
None
try
:
sock
=
socket
.
socket
(
af
,
socktype
,
proto
)
if
socktype
==
socket
.
SOCK_STREAM
:
sock
.
connect
(
sa
)
break
except
socket
.
error
as
exc
:
err
=
exc
if
sock
is
not
None
:
sock
.
close
()
if
err
is
not
None
:
raise
err
self
.
socket
=
sock
self
.
socktype
=
socktype
self
.
formatter
=
None
def
_connect_unixsocket
(
self
,
address
):
use_socktype
=
self
.
socktype
...
...
@@ -812,7 +827,7 @@ class SysLogHandler(logging.Handler):
priority
=
self
.
priority_names
[
priority
]
return
(
facility
<<
3
)
|
priority
def
close
(
self
):
def
close
(
self
):
"""
Closes the socket.
"""
...
...
Misc/NEWS
Dosyayı görüntüle @
3ef3bcbe
...
...
@@ -49,6 +49,9 @@ Extension Modules
Library
-------
- bpo-30378: Fix the problem that logging.handlers.SysLogHandler cannot
handle IPv6 addresses.
- bpo-29960: Preserve generator state when _random.Random.setstate()
raises an exception. Patch by Bryan Olson.
...
...
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