Skip to content

Commit

Permalink
Moved imports into method headers to fix issues with interactive sess…
Browse files Browse the repository at this point in the history
…ions. (#297)
  • Loading branch information
tcuthbert authored and jathanism committed Sep 6, 2016
1 parent 96b0294 commit cb5c121
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions trigger/netdevices/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
from trigger.conf import settings
from trigger.utils import network, parse_node_port
from trigger.utils.url import parse_url
from trigger.twister2 import generate_endpoint, TriggerEndpointClientFactory, IoslikeSendExpect
from trigger import changemgmt, exceptions, rancid
from UserDict import DictMixin
from crochet import setup, run_in_reactor, wait_for
Expand Down Expand Up @@ -510,6 +509,7 @@ def os(self):
return None

def _get_endpoint(self, *args):
from trigger.twister2 import generate_endpoint, TriggerEndpointClientFactory, IoslikeSendExpect
endpoint = generate_endpoint(self).wait()

factory = TriggerEndpointClientFactory()
Expand Down Expand Up @@ -571,7 +571,7 @@ def get_results(self):
return self._results

def run_channeled_commands(self, commands, on_error=None):
from trigger.twister2 import TriggerSSHShellClientEndpointBase
from trigger.twister2 import TriggerSSHShellClientEndpointBase, IoslikeSendExpect, TriggerEndpointClientFactory

if on_error is None:
on_error = lambda x: x
Expand Down Expand Up @@ -600,7 +600,7 @@ def inject_commands_into_protocol(proto):
return d

def run_commands(self, commands, on_error=None):
from trigger.twister2 import TriggerSSHShellClientEndpointBase
from trigger.twister2 import TriggerSSHShellClientEndpointBase, IoslikeSendExpect, TriggerEndpointClientFactory

if on_error is None:
on_error = lambda x: x
Expand Down

0 comments on commit cb5c121

Please sign in to comment.