Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gevent version #269

Closed
gdamich opened this issue Jan 5, 2021 · 1 comment · Fixed by #270
Closed

gevent version #269

gdamich opened this issue Jan 5, 2021 · 1 comment · Fixed by #270

Comments

@gdamich
Copy link

gdamich commented Jan 5, 2021

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 
@pkittenis
Copy link
Member

Hi there,

Thank you for the interest and report.

Minimum gevent version has been updated to resolve this in 2.5.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants