Commit 9213cf89 by Stephen Fromm

Change to transport is local *and* is localhost

Connection.connect() now requires that, in order to use LocalConnection,
you specify transport is local and that the hostname is localhost.
parent 6749903e
...@@ -41,7 +41,7 @@ class Connection(object): ...@@ -41,7 +41,7 @@ class Connection(object):
def connect(self, host): def connect(self, host):
conn = None conn = None
if self.transport == 'local' or self._LOCALHOSTRE.search(host): if self.transport == 'local' and self._LOCALHOSTRE.search(host):
conn = LocalConnection(self.runner, host) conn = LocalConnection(self.runner, host)
elif self.transport == 'paramiko': elif self.transport == 'paramiko':
conn = ParamikoConnection(self.runner, host) conn = ParamikoConnection(self.runner, host)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment