diff options
author | Tom Rini <trini@konsulko.com> | 2019-10-24 11:59:20 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-10-30 17:48:47 -0400 |
commit | fe1193e254faccc4e6629f1cfbc99d5ceb34428a (patch) | |
tree | 73c71f3873328c3e194296da9b2554022703a416 /test/py/conftest.py | |
parent | 3c941e048c824b94ae09fd9e1f91116f55ce0f1f (diff) | |
download | u-boot-fe1193e254faccc4e6629f1cfbc99d5ceb34428a.zip u-boot-fe1193e254faccc4e6629f1cfbc99d5ceb34428a.tar.gz u-boot-fe1193e254faccc4e6629f1cfbc99d5ceb34428a.tar.bz2 |
test/py: Automated conversion to Python 3
Use the 2to3 tool to perform numerous automatic conversions from Python
2 syntax to Python 3. Also fix whitespace problems that Python 3
catches that Python 2 did not.
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Simon Glass <sjg@chromium.org> [on sandbox]
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'test/py/conftest.py')
-rw-r--r-- | test/py/conftest.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/test/py/conftest.py b/test/py/conftest.py index 30c898b..5c19af1 100644 --- a/test/py/conftest.py +++ b/test/py/conftest.py @@ -19,13 +19,10 @@ import os.path import pytest from _pytest.runner import runtestprotocol import re -import StringIO +import io import sys -try: - import configparser -except: - import ConfigParser as configparser +import configparser # Globals: The HTML log file, and the connection to the U-Boot console. log = None @@ -169,7 +166,7 @@ def pytest_configure(config): with open(dot_config, 'rt') as f: ini_str = '[root]\n' + f.read() - ini_sio = StringIO.StringIO(ini_str) + ini_sio = io.StringIO(ini_str) parser = configparser.RawConfigParser() parser.readfp(ini_sio) ubconfig.buildconfig.update(parser.items('root')) |