avocado.aexpect: Fix bugs that broke avocado-virt

We can't require avocado imports in the server part of
the aexpect process because that will be executed
stand alone, and will not have access to the rest
of the avocado libraries. The bugs were introduced
in commits:

6f380e0d
3fa9077f

This patch fixes the problem by moving the imports
to the client side of the module.
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
上级 dceba3be
......@@ -15,10 +15,6 @@ import tempfile
import logging
import shutil
from avocado.utils import genio
from avocado.utils import path as utils_path
BASE_DIR = os.environ.get('TMPDIR', '/tmp')
# If you want to debug problems with your aexpect instances, setting
# DEBUG = True will leave the temporary files created by aexpect around
......@@ -277,7 +273,9 @@ except ImportError:
from avocado.utils import astring
from avocado.utils import data_factory
from avocado.utils import process
from avocado.utils import genio
from avocado.utils import wait
from avocado.utils import path as utils_path
class ExpectError(Exception):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册