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
eee80ee2
Kaydet (Commit)
eee80ee2
authored
Eki 18, 2001
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Patch #470744: Simplify __repr__ error handling.
üst
61c5edf6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
16 deletions
+4
-16
asyncore.py
Lib/asyncore.py
+4
-16
No files found.
Lib/asyncore.py
Dosyayı görüntüle @
eee80ee2
...
@@ -50,7 +50,6 @@ import exceptions
...
@@ -50,7 +50,6 @@ import exceptions
import
select
import
select
import
socket
import
socket
import
sys
import
sys
import
types
import
os
import
os
from
errno
import
EALREADY
,
EINPROGRESS
,
EWOULDBLOCK
,
ECONNRESET
,
\
from
errno
import
EALREADY
,
EINPROGRESS
,
EWOULDBLOCK
,
ECONNRESET
,
\
...
@@ -208,28 +207,17 @@ class dispatcher:
...
@@ -208,28 +207,17 @@ class dispatcher:
self
.
addr
=
sock
.
getpeername
()
self
.
addr
=
sock
.
getpeername
()
def
__repr__
(
self
):
def
__repr__
(
self
):
try
:
status
=
[
self
.
__class__
.
__module__
+
"."
+
self
.
__class__
.
__name__
]
status
=
[
self
.
__class__
.
__module__
+
"."
+
self
.
__class__
.
__name__
]
if
self
.
accepting
and
self
.
addr
:
if
self
.
accepting
and
self
.
addr
:
status
.
append
(
'listening'
)
status
.
append
(
'listening'
)
elif
self
.
connected
:
elif
self
.
connected
:
status
.
append
(
'connected'
)
status
.
append
(
'connected'
)
if
self
.
addr
:
if
self
.
addr
is
not
None
:
if
type
(
self
.
addr
)
==
types
.
TupleType
:
try
:
status
.
append
(
'
%
s:
%
d'
%
self
.
addr
)
status
.
append
(
'
%
s:
%
d'
%
self
.
addr
)
e
lse
:
e
xcept
TypeError
:
status
.
append
(
self
.
addr
)
status
.
append
(
repr
(
self
.
addr
)
)
return
'<
%
s at
%#
x>'
%
(
' '
.
join
(
status
),
id
(
self
))
return
'<
%
s at
%#
x>'
%
(
' '
.
join
(
status
),
id
(
self
))
except
:
pass
try
:
ar
=
repr
(
self
.
addr
)
except
AttributeError
:
ar
=
'no self.addr!'
return
'<__repr__() failed for
%
s instance at
%
x (addr=
%
s)>'
%
\
(
self
.
__class__
.
__name__
,
id
(
self
),
ar
)
def
add_channel
(
self
,
map
=
None
):
def
add_channel
(
self
,
map
=
None
):
#self.log_info ('adding channel %s' % self)
#self.log_info ('adding channel %s' % self)
...
...
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