aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload/provider/script_host.py
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-01-18 13:44:26 -0500
committerJustin M. Keyes <justinkz@gmail.com>2016-01-18 13:44:26 -0500
commitee0e214427d7ed2a9fd8ffc85c424cfffc927408 (patch)
treea4abc50089216925876c23b8b4d768712b5de699 /runtime/autoload/provider/script_host.py
parent74d450aa7b73bb3d1d74ef59b85da6f44ba991bd (diff)
parent38435e8a053923c9e0b3e7c9a9d43dd6725c06b8 (diff)
downloadrneovim-ee0e214427d7ed2a9fd8ffc85c424cfffc927408.tar.gz
rneovim-ee0e214427d7ed2a9fd8ffc85c424cfffc927408.tar.bz2
rneovim-ee0e214427d7ed2a9fd8ffc85c424cfffc927408.zip
Merge pull request #4046 from strokirk/fix-redirectstream-iobase
python: Add missing I/O methods to RedirectStream
Diffstat (limited to 'runtime/autoload/provider/script_host.py')
-rw-r--r--runtime/autoload/provider/script_host.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/runtime/autoload/provider/script_host.py b/runtime/autoload/provider/script_host.py
index 96d70e0330..416b4070bb 100644
--- a/runtime/autoload/provider/script_host.py
+++ b/runtime/autoload/provider/script_host.py
@@ -1,5 +1,6 @@
"""Legacy python/python3-vim emulation."""
import imp
+import io
import logging
import os
import sys
@@ -151,7 +152,7 @@ class ScriptHost(object):
current.range = current.buffer.range(start, stop)
-class RedirectStream(object):
+class RedirectStream(io.IOBase):
def __init__(self, redirect_handler):
self.redirect_handler = redirect_handler
@@ -161,9 +162,6 @@ class RedirectStream(object):
def writelines(self, seq):
self.redirect_handler('\n'.join(seq))
- def flush(self):
- pass
-
class LegacyEvalHook(neovim.SessionHook):