提交 a5617102 编写于 作者: R Rudá Moura 提交者: Ruda Moura

avocado.utils.remote: Log when module is disabled.

Log message if remote or virt module is off.
Signed-off-by: NRuda Moura <rmoura@redhat.com>
上级 b4f83e70
......@@ -17,12 +17,16 @@ Module to provide remote operations.
"""
import getpass
import logging
log = logging.getLogger('avocado.test')
try:
import fabric.api
import fabric.operations
except ImportError:
remote_capable = False
log.info('Remote module is disabled: could not import fabric')
else:
remote_capable = True
......
......@@ -16,10 +16,15 @@
Module to provide classes for Virtual Machines.
"""
import logging
log = logging.getLogger('avocado.test')
try:
import libvirt
except ImportError:
virt_capable = False
log.info('Virt module is disabled: could not import libvirt')
else:
virt_capable = True
......@@ -28,6 +33,7 @@ from avocado.utils import remote
if remote.remote_capable is False:
virt_capable = False
log.info('Virt module is disabled: remote module is disabled')
class Hypervisor(object):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册