From 6100933a28304a4bfb961ec4a3667443e9821a97 Mon Sep 17 00:00:00 2001 From: Renato Alves Date: Fri, 17 Jul 2015 07:55:37 +0100 Subject: [PATCH] BaseTest: Reorganize imports and make shlex global --- test/basetest/task.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/test/basetest/task.py b/test/basetest/task.py index 0125362f3..fa766787a 100644 --- a/test/basetest/task.py +++ b/test/basetest/task.py @@ -1,15 +1,15 @@ # -*- coding: utf-8 -*- -import os -import tempfile -import shutil import atexit -import unittest import json -from .utils import (run_cmd_wait, run_cmd_wait_nofail, which, - task_binary_location) +import os +import shlex +import shutil +import tempfile +import unittest from .exceptions import CommandError from .hooks import Hooks +from .utils import run_cmd_wait, run_cmd_wait_nofail, which, task_binary_location class Task(object): @@ -166,12 +166,10 @@ class Task(object): try: # Python 2.x if isinstance(args, basestring): - import shlex args = shlex.split(args) except NameError: # Python 3.x if isinstance(args, str): - import shlex args = shlex.split(args) return args