Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Lib/idlelib/rpc.py

    r2 r391  
    33For security reasons, GvR requested that Idle's Python execution server process
    44connect to the Idle process, which listens for the connection.  Since Idle has
    5 has only one client per server, this was not a limitation.
     5only one client per server, this was not a limitation.
    66
    77   +---------------------------------+ +-------------+
     
    145145    def exithook(self):
    146146        "override for specific exit action"
    147         os._exit()
     147        os._exit(0)
    148148
    149149    def debug(self, *args):
     
    170170        except TypeError:
    171171            return ("ERROR", "Bad request format")
    172         if not self.objtable.has_key(oid):
     172        if oid not in self.objtable:
    173173            return ("ERROR", "Unknown object id: %r" % (oid,))
    174174        obj = self.objtable[oid]
     
    305305            cvar = self.cvars[myseq]
    306306            cvar.acquire()
    307             while not self.responses.has_key(myseq):
     307            while myseq not in self.responses:
    308308                cvar.wait()
    309309            response = self.responses[myseq]
     
    519519    def __init__(self, address, family=socket.AF_INET, type=socket.SOCK_STREAM):
    520520        self.listening_sock = socket.socket(family, type)
    521         self.listening_sock.setsockopt(socket.SOL_SOCKET,
    522                                        socket.SO_REUSEADDR, 1)
    523521        self.listening_sock.bind(address)
    524522        self.listening_sock.listen(1)
     
    553551        if self.__attributes is None:
    554552            self.__getattributes()
    555         if self.__attributes.has_key(name):
     553        if name in self.__attributes:
    556554            value = self.sockio.remotecall(self.oid, '__getattribute__',
    557555                                           (name,), {})
     
    573571    for name in dir(obj):
    574572        attr = getattr(obj, name)
    575         if callable(attr):
     573        if hasattr(attr, '__call__'):
    576574            methods[name] = 1
    577575    if type(obj) == types.InstanceType:
     
    584582    for name in dir(obj):
    585583        attr = getattr(obj, name)
    586         if not callable(attr):
     584        if not hasattr(attr, '__call__'):
    587585            attributes[name] = 1
    588586
     
    600598
    601599# 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.