Skip to content

Last line of output is always an exception #46

@cwells

Description

@cwells

Same issue running latest release or HEAD.

from pssh import ParallelSSHClient

hosts = ['host1.fqdn', 'host2.fqdn']
client = ParallelSSHClient(hosts, proxy_host='gw.fqdn')
output = client.run_command('ls -l /home', sudo=False)

for host in output:
    for line in output[host]['stdout']:
        print "Host %s: %s" % (host, line)

Output:

Host host2.fqdn: drwx------  2 root          root          16384 Oct 22  2014 lost+found
Host host2.fqdn: drwx------. 8 alice      users       4096 Oct  5 05:26 alice
Host host2.fqdn: drwx------. 3 joe         users          4096 Oct 22  2014 joe
Host host2.fqdn: drwx------. 4 steve      users       4096 Sep  9 00:02 steve
Host host2.fqdn: drwx------. 3 debbie       users        4096 Jun  2 21:13 debbie
Exception KeyError: KeyError(140473008761904,) in <module 'threading' from '/usr/lib64/python2.7/threading.pyc'> ignored

If I add more hosts, the exception moves to the last line of whatever the last host is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions