mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Fix StringIO module import to be compatible with Python3
This commit is contained in:
parent
5bd0fca140
commit
bf66a08c02
2 changed files with 4 additions and 4 deletions
|
@ -16,7 +16,7 @@ import platform
|
|||
import shutil
|
||||
from socket import error as socket_error
|
||||
import stat
|
||||
import StringIO
|
||||
from io import BytesIO
|
||||
import sys
|
||||
import time
|
||||
import zipfile
|
||||
|
@ -154,7 +154,7 @@ def download(desc, src, writer, start_byte=0):
|
|||
|
||||
|
||||
def download_bytes(desc, src):
|
||||
content_writer = StringIO.StringIO()
|
||||
content_writer = BytesIO()
|
||||
download(desc, src, content_writer)
|
||||
return content_writer.getvalue()
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import itertools
|
|||
import json
|
||||
import os
|
||||
import re
|
||||
import StringIO
|
||||
from io import StringIO
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
@ -345,7 +345,7 @@ def check_flake8(file_name, contents):
|
|||
"E501", # 80 character line length; the standard tidy process will enforce line length
|
||||
}
|
||||
|
||||
output = StringIO.StringIO()
|
||||
output = StringIO()
|
||||
with stdout_redirect(output):
|
||||
check_code(contents, ignore=ignore)
|
||||
for error in output.getvalue().splitlines():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue