Skip to content

gevent version #269

@gdamich

Description

@gdamich

Describe the bug
It looks that at least on gevent version I'm using (gevent 1.1.2) is yielding error on Timeout object due to missing attribute (1.1.2 is as I can see from 2016, and with this, commit Timeout.close() was introduced: commit

To Reproduce

Steps to reproduce the behaviour:

...
output = client.run_command(cmd, use_pty=True, read_timeout=2)

for host_out in output:
    try:
        for line in host_out.stdout:
            print(line)
        for line in host_out.stderr:
            print(line)
    except Timeout:
        pass
    for line in host_out.stdout:
  File "/usr/local/lib/python2.7/dist-packages/pssh/clients/base/single.py", line 464, in read_output_buffer
    for line in output_buffer:
  File "/usr/local/lib/python2.7/dist-packages/pssh/clients/base/single.py", line 434, in _read_output_buffer
    timer.close()
AttributeError: 'Timeout' object has no attribute 'close'

Expected behaviour
Well, looking at your requirements and gevent>=1.1, I would expect that issue does not happen.

Actual behaviour
the exception from above

Additional information

# pip list | grep ssh
parallel-ssh                  2.5.1      
ssh-python                    0.9.0      
ssh2-python                   0.26.0 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions