Changeset 391 for python/trunk/Lib/idlelib/rpc.py
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Lib/idlelib/rpc.py
r2 r391 3 3 For security reasons, GvR requested that Idle's Python execution server process 4 4 connect to the Idle process, which listens for the connection. Since Idle has 5 hasonly one client per server, this was not a limitation.5 only one client per server, this was not a limitation. 6 6 7 7 +---------------------------------+ +-------------+ … … 145 145 def exithook(self): 146 146 "override for specific exit action" 147 os._exit( )147 os._exit(0) 148 148 149 149 def debug(self, *args): … … 170 170 except TypeError: 171 171 return ("ERROR", "Bad request format") 172 if not self.objtable.has_key(oid):172 if oid not in self.objtable: 173 173 return ("ERROR", "Unknown object id: %r" % (oid,)) 174 174 obj = self.objtable[oid] … … 305 305 cvar = self.cvars[myseq] 306 306 cvar.acquire() 307 while not self.responses.has_key(myseq):307 while myseq not in self.responses: 308 308 cvar.wait() 309 309 response = self.responses[myseq] … … 519 519 def __init__(self, address, family=socket.AF_INET, type=socket.SOCK_STREAM): 520 520 self.listening_sock = socket.socket(family, type) 521 self.listening_sock.setsockopt(socket.SOL_SOCKET,522 socket.SO_REUSEADDR, 1)523 521 self.listening_sock.bind(address) 524 522 self.listening_sock.listen(1) … … 553 551 if self.__attributes is None: 554 552 self.__getattributes() 555 if self.__attributes.has_key(name):553 if name in self.__attributes: 556 554 value = self.sockio.remotecall(self.oid, '__getattribute__', 557 555 (name,), {}) … … 573 571 for name in dir(obj): 574 572 attr = getattr(obj, name) 575 if callable(attr):573 if hasattr(attr, '__call__'): 576 574 methods[name] = 1 577 575 if type(obj) == types.InstanceType: … … 584 582 for name in dir(obj): 585 583 attr = getattr(obj, name) 586 if not callable(attr):584 if not hasattr(attr, '__call__'): 587 585 attributes[name] = 1 588 586 … … 600 598 601 599 # XXX KBK 09Sep03 We need a proper unit test for this module. Previously 602 # existing test code was removed at Rev 1.27 .600 # existing test code was removed at Rev 1.27 (r34098).
Note:
See TracChangeset
for help on using the changeset viewer.