Skip to content

Instantly share code, notes, and snippets.

@danlamanna
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save danlamanna/179424d631d5b231970f to your computer and use it in GitHub Desktop.

Select an option

Save danlamanna/179424d631d5b231970f to your computer and use it in GitHub Desktop.
with settings(host_string="root@192.168.1.8:7491"):
run("ls")
SystemExit Traceback (most recent call last)
<ipython-input-2-1217877993c6> in <module>()
1 with settings(host_string="root@192.168.1.8:7491"):
----> 2 run("ls")
3
/home/dan/.local/lib/python2.7/site-packages/fabric/network.pyc in host_prompting_wrapper(*args, **kwargs)
645 " host string for connection: ")
646 env.update(to_dict(host_string))
--> 647 return func(*args, **kwargs)
648 host_prompting_wrapper.undecorated = func
649 return host_prompting_wrapper
/home/dan/.local/lib/python2.7/site-packages/fabric/operations.pyc in run(command, shell, pty, combine_stderr, quiet, warn_only, stdout, stderr, timeout, shell_escape)
1040 return _run_command(command, shell, pty, combine_stderr, quiet=quiet,
1041 warn_only=warn_only, stdout=stdout, stderr=stderr, timeout=timeout,
-> 1042 shell_escape=shell_escape)
1043
1044
/home/dan/.local/lib/python2.7/site-packages/fabric/operations.pyc in _run_command(command, shell, pty, combine_stderr, sudo, user, quiet, warn_only, stdout, stderr, group, timeout, shell_escape)
907 # Actual execution, stdin/stdout/stderr handling, and termination
908 result_stdout, result_stderr, status = _execute(
--> 909 channel=default_channel(), command=wrapped_command, pty=pty,
910 combine_stderr=combine_stderr, invoke_shell=False, stdout=stdout,
911 stderr=stderr, timeout=timeout)
/home/dan/.local/lib/python2.7/site-packages/fabric/state.pyc in default_channel()
388 """
389 try:
--> 390 chan = _open_session()
391 except ssh.SSHException, err:
392 if str(err) == 'SSH session not active':
/home/dan/.local/lib/python2.7/site-packages/fabric/state.pyc in _open_session()
380
381 def _open_session():
--> 382 return connections[env.host_string].get_transport().open_session()
383
384
/home/dan/.local/lib/python2.7/site-packages/fabric/network.pyc in __getitem__(self, key)
157 key = normalize_to_string(key)
158 if key not in self:
--> 159 self.connect(key)
160 return dict.__getitem__(self, key)
161
/home/dan/.local/lib/python2.7/site-packages/fabric/network.pyc in connect(self, key)
149 seek_gateway = normalize_to_string(env.gateway) != key
150 self[key] = connect(
--> 151 user, host, port, cache=self, seek_gateway=seek_gateway)
152
153 def __getitem__(self, key):
/home/dan/.local/lib/python2.7/site-packages/fabric/network.pyc in connect(user, host, port, cache, seek_gateway)
536 # Print a newline (in case user was sitting at prompt)
537 print('')
--> 538 sys.exit(0)
539 # Handle DNS error / name lookup failure
540 except socket.gaierror, e:
SystemExit: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment