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

Attempting to forward agent w/o actual local agent raises TypeError #402

Closed
bitprophet opened this issue Sep 22, 2014 · 1 comment
Closed

Attempting to forward agent w/o actual local agent raises TypeError #402

bitprophet opened this issue Sep 22, 2014 · 1 comment

Comments

@bitprophet
Copy link
Member

@bitprophet bitprophet commented Sep 22, 2014

E.g. when running this integration test on Fabric where I stupidly neglected to set up an actual local agent first, we get:

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/opt/python/2.6.9/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/home/travis/virtualenv/python2.6.9/src/paramiko/paramiko/agent.py", line 114, in run
    self._communicate()
  File "/home/travis/virtualenv/python2.6.9/src/paramiko/paramiko/agent.py", line 124, in _communicate
    events = select([self._agent._conn, self.__inr], [], [], 0.5)
TypeError: argument must be an int, or have a fileno() method.

This is the same as Fabric #642.

Presumably we can just check for the value being handed to the select call to ensure it's not None or whatnot, and raise some more useful exception (or, possibly, just emit a log warning, though since this only happens on explicit attempts to forward an agent, it not functioning should probably be considered a stop-worthy error.)

@dhiltonp
Copy link

@dhiltonp dhiltonp commented Jan 24, 2015

This works for us; we were triggering this issue by running exec_command('ssh host command') from a cronjob.

@bitprophet bitprophet closed this in c5d0d6a Feb 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants