mercurial/sshpeer.py
changeset 36369 066e6a9d52bb
parent 36367 043e77f3be09
child 36370 11ba1a96f946
equal deleted inserted replaced
36368:02782e6e2c38 36369:066e6a9d52bb
    63 
    63 
    64         return a pair of boolean (ismainready, issideready)
    64         return a pair of boolean (ismainready, issideready)
    65 
    65 
    66         (This will only wait for data if the setup is supported by `util.poll`)
    66         (This will only wait for data if the setup is supported by `util.poll`)
    67         """
    67         """
    68         if getattr(self._main, 'hasbuffer', False): # getattr for classic pipe
    68         if (isinstance(self._main, util.bufferedinputpipe) and
    69             return (True, True) # main has data, assume side is worth poking at.
    69             self._main.hasbuffer):
       
    70             # Main has data. Assume side is worth poking at.
       
    71             return True, True
       
    72 
    70         fds = [self._main.fileno(), self._side.fileno()]
    73         fds = [self._main.fileno(), self._side.fileno()]
    71         try:
    74         try:
    72             act = util.poll(fds)
    75             act = util.poll(fds)
    73         except NotImplementedError:
    76         except NotImplementedError:
    74             # non supported yet case, assume all have data.
    77             # non supported yet case, assume all have data.