aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy
diff options
context:
space:
mode:
authormarmeladema <xademax@gmail.com>2019-10-14 18:19:07 +0100
committermarmeladema <xademax@gmail.com>2019-10-16 00:22:08 +0100
commitbf66a08c023e0f8fe93ad1a41dae90e0ca12c002 (patch)
treeda8c98480bab078807a779a5cfcb605dcbacc287 /python/tidy
parent5bd0fca1405f1c7748d255dd0ba65ce7ba133c0a (diff)
downloadservo-bf66a08c023e0f8fe93ad1a41dae90e0ca12c002.tar.gz
servo-bf66a08c023e0f8fe93ad1a41dae90e0ca12c002.zip
Fix StringIO module import to be compatible with Python3
Diffstat (limited to 'python/tidy')
-rw-r--r--python/tidy/servo_tidy/tidy.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/tidy/servo_tidy/tidy.py b/python/tidy/servo_tidy/tidy.py
index f7fa296790d..2c9985bca34 100644
--- a/python/tidy/servo_tidy/tidy.py
+++ b/python/tidy/servo_tidy/tidy.py
@@ -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():