提交 c4598268 编写于 作者: C Cleber Rosa

Remote Runner: assume dependencies are fulfilled

This is a prep work for making the Remote Runner an optional plugin.

By installing the Remote Runner through the usual ways (setup.py) the
dependencies will always be fullfilled, so this manual check is not
needed or desirable.

If users still want to check for the presence of this feature, they
should use standard Python pkg_resources for that.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 e351d11d
......@@ -20,22 +20,15 @@ import getpass
import os
import time
import fabric.api
import fabric.network
import fabric.operations
import fabric.tasks
from fabric.context_managers import shell_env
from .settings import settings
from ..utils import process
try:
import fabric.api
import fabric.network
import fabric.operations
import fabric.tasks
from fabric.context_managers import shell_env
except ImportError:
REMOTE_CAPABLE = False
LOG.info('Remote module is disabled: could not import fabric')
fabric = None
else:
REMOTE_CAPABLE = True
class RemoterError(Exception):
pass
......
......@@ -33,11 +33,6 @@ else:
VIRT_CAPABLE = True
if remoter.REMOTE_CAPABLE is False:
VIRT_CAPABLE = False
LOG.info('Virt module is disabled: remote module is disabled')
class VirtError(Exception):
"""
......
......@@ -20,7 +20,6 @@ import sys
from avocado.core import exit_codes
from avocado.core import loader
from avocado.core import remoter
from avocado.core.plugin_interfaces import CLI
from avocado.core.remote import RemoteTestRunner
......@@ -35,9 +34,6 @@ class Remote(CLI):
description = "Remote machine options for 'run' subcommand"
def configure(self, parser):
if remoter.REMOTE_CAPABLE is False:
return
run_subcommand_parser = parser.subcommands.choices.get('run', None)
if run_subcommand_parser is None:
return
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册