diff --git a/deps/input_event/input_event_win.py b/deps/input_event/input_event_win.py index 3b3b32bd7a..e68ae59632 100755 --- a/deps/input_event/input_event_win.py +++ b/deps/input_event/input_event_win.py @@ -3,13 +3,9 @@ import json import os import sys +import tkinter from ctypes import wintypes -try: - import Tkinter as tkinter -except ImportError: - import tkinter - import win32api import win32con diff --git a/provider/input_event_proxy.py b/provider/input_event_proxy.py index 7c582b3cad..3d9e8b198f 100644 --- a/provider/input_event_proxy.py +++ b/provider/input_event_proxy.py @@ -1,11 +1,7 @@ import json import logging import os - -try: - from queue import Queue -except ImportError: - from Queue import Queue +from queue import Queue from virttest import data_dir, utils_misc diff --git a/qemu/tests/kvm_unit_test.py b/qemu/tests/kvm_unit_test.py index 586404c78f..4e671870f2 100644 --- a/qemu/tests/kvm_unit_test.py +++ b/qemu/tests/kvm_unit_test.py @@ -1,11 +1,7 @@ import glob import os import shutil - -try: - from configparser import ConfigParser -except ImportError: - from ConfigParser import ConfigParser +from configparser import ConfigParser from virttest import env_process, utils_misc diff --git a/qemu/tests/performance.py b/qemu/tests/performance.py index 83800f56eb..96a6ed7dc9 100644 --- a/qemu/tests/performance.py +++ b/qemu/tests/performance.py @@ -3,14 +3,9 @@ import shelve import shutil import threading +from queue import Queue import six - -try: - from queue import Queue -except ImportError: - from Queue import Queue - from avocado.utils import download, process from virttest import data_dir, utils_misc, utils_test diff --git a/qemu/tests/qemu_io_blkdebug.py b/qemu/tests/qemu_io_blkdebug.py index e19103fd9e..1dec2f35a6 100644 --- a/qemu/tests/qemu_io_blkdebug.py +++ b/qemu/tests/qemu_io_blkdebug.py @@ -1,10 +1,6 @@ import os import re - -try: - from configparser import ConfigParser -except ImportError: - from ConfigParser import ConfigParser +from configparser import ConfigParser from avocado.utils import process from virttest import data_dir, error_context, qemu_io, utils_misc diff --git a/qemu/tests/usb_common.py b/qemu/tests/usb_common.py index 93126e1153..c317066c07 100644 --- a/qemu/tests/usb_common.py +++ b/qemu/tests/usb_common.py @@ -1,7 +1,4 @@ -try: - import simplejson as json -except ImportError: - import json +import json import logging from collections import OrderedDict