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
39e3528b
Kaydet (Commit)
39e3528b
authored
May 21, 2011
tarafından
Vinay Sajip
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #12136: Added change to handle non-availability of the ssl module.
üst
4bdd9f36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
test_logging.py
Lib/test/test_logging.py
+14
-9
No files found.
Lib/test/test_logging.py
Dosyayı görüntüle @
39e3528b
...
...
@@ -1526,14 +1526,17 @@ IRbTpvlHWPjsSvHz0ZOH
for
secure
in
(
False
,
True
):
addr
=
(
'localhost'
,
0
)
if
secure
:
import
ssl
fd
,
fn
=
tempfile
.
mkstemp
()
os
.
close
(
fd
)
with
open
(
fn
,
'w'
)
as
f
:
f
.
write
(
self
.
PEMFILE
)
sslctx
=
ssl
.
SSLContext
(
ssl
.
PROTOCOL_SSLv23
)
sslctx
.
load_cert_chain
(
fn
)
os
.
unlink
(
fn
)
try
:
import
ssl
fd
,
fn
=
tempfile
.
mkstemp
()
os
.
close
(
fd
)
with
open
(
fn
,
'w'
)
as
f
:
f
.
write
(
self
.
PEMFILE
)
sslctx
=
ssl
.
SSLContext
(
ssl
.
PROTOCOL_SSLv23
)
sslctx
.
load_cert_chain
(
fn
)
os
.
unlink
(
fn
)
except
ImportError
:
sslctx
=
None
else
:
sslctx
=
None
self
.
server
=
server
=
TestHTTPServer
(
addr
,
self
.
handle_request
,
...
...
@@ -1541,7 +1544,9 @@ IRbTpvlHWPjsSvHz0ZOH
server
.
start
()
server
.
ready
.
wait
()
host
=
'localhost:
%
d'
%
server
.
server_port
self
.
h_hdlr
=
logging
.
handlers
.
HTTPHandler
(
host
,
'/frob'
,
secure
=
secure
)
secure_client
=
secure
and
sslctx
self
.
h_hdlr
=
logging
.
handlers
.
HTTPHandler
(
host
,
'/frob'
,
secure
=
secure_client
)
self
.
log_data
=
None
root_logger
.
addHandler
(
self
.
h_hdlr
)
...
...
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