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

bitprophet opened this Issue Sep 22, 2014 · 1 comment


None yet

2 participants


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/", line 532, in __bootstrap_inner
  File "/home/travis/virtualenv/python2.6.9/src/paramiko/paramiko/", line 114, in run
  File "/home/travis/virtualenv/python2.6.9/src/paramiko/paramiko/", 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.)


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