mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
merge r68839 forward to py3k
This commit is contained in:
parent
08838b6acf
commit
63b3a97a2a
2 changed files with 5 additions and 3 deletions
|
@ -139,7 +139,7 @@ class Server(object):
|
|||
self.listener = Listener(address=address, backlog=5)
|
||||
self.address = self.listener.address
|
||||
|
||||
self.id_to_obj = {0: (None, ())}
|
||||
self.id_to_obj = {'0': (None, ())}
|
||||
self.id_to_refcount = {}
|
||||
self.mutex = threading.RLock()
|
||||
self.stop = 0
|
||||
|
@ -301,7 +301,7 @@ class Server(object):
|
|||
keys = list(self.id_to_obj.keys())
|
||||
keys.sort()
|
||||
for ident in keys:
|
||||
if ident != 0:
|
||||
if ident != '0':
|
||||
result.append(' %s: refcount=%s\n %s' %
|
||||
(ident, self.id_to_refcount[ident],
|
||||
str(self.id_to_obj[ident][0])[:75]))
|
||||
|
@ -313,7 +313,7 @@ class Server(object):
|
|||
'''
|
||||
Number of shared objects
|
||||
'''
|
||||
return len(self.id_to_obj) - 1 # don't count ident=0
|
||||
return len(self.id_to_obj) - 1 # don't count ident='0'
|
||||
|
||||
def shutdown(self, c):
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue