mercurial/sshpeer.py
changeset 36369 066e6a9d52bb
parent 36367 043e77f3be09
child 36370 11ba1a96f946
--- a/mercurial/sshpeer.py	Mon Feb 19 13:20:17 2018 -0800
+++ b/mercurial/sshpeer.py	Wed Feb 21 13:08:55 2018 -0800
@@ -65,8 +65,11 @@
 
         (This will only wait for data if the setup is supported by `util.poll`)
         """
-        if getattr(self._main, 'hasbuffer', False): # getattr for classic pipe
-            return (True, True) # main has data, assume side is worth poking at.
+        if (isinstance(self._main, util.bufferedinputpipe) and
+            self._main.hasbuffer):
+            # Main has data. Assume side is worth poking at.
+            return True, True
+
         fds = [self._main.fileno(), self._side.fileno()]
         try:
             act = util.poll(fds)