mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Use BytesIO in Python 2.
This commit is contained in:
parent
a96efb72e0
commit
a1bf02b269
1 changed files with 4 additions and 4 deletions
|
|
@ -1,8 +1,5 @@
|
|||
import contextlib
|
||||
try:
|
||||
from io import StringIO
|
||||
except ImportError:
|
||||
from StringIO import StringIO
|
||||
from io import StringIO
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
|
|
@ -11,6 +8,9 @@ from _pydevd_bundle import pydevd_comm
|
|||
import ptvsd.wrapper
|
||||
from ptvsd.__main__ import run_module, run_file, parse_args
|
||||
|
||||
if sys.version_info < (3,):
|
||||
from io import BytesIO as StringIO # noqa
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def captured_stdio(out=None, err=None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue