mercurial/debugcommands.py
changeset 36741 7a25f6cfebe8
parent 36719 390d16ea7c76
child 36778 7aae39d03139
--- a/mercurial/debugcommands.py	Sun Mar 04 16:55:51 2018 -0500
+++ b/mercurial/debugcommands.py	Mon Mar 05 20:22:34 2018 -0500
@@ -2818,11 +2818,16 @@
         elif action == 'close':
             peer.close()
         elif action == 'readavailable':
-            fds = util.poll([stdout.fileno(), stderr.fileno()])
-
-            if stdout.fileno() in fds:
+            fds = [stdout.fileno(), stderr.fileno()]
+            try:
+                act = util.poll(fds)
+            except NotImplementedError:
+                # non supported yet case, assume all have data.
+                act = fds
+
+            if stdout.fileno() in act:
                 util.readpipe(stdout)
-            if stderr.fileno() in fds:
+            if stderr.fileno() in act:
                 util.readpipe(stderr)
         elif action == 'readline':
             stdout.readline()