Paramiko import abort doesn't actually print exception msg #389

Closed
bitprophet opened this Issue Aug 19, 2011 · 3 comments

Projects

None yet

1 participant

@bitprophet
Member

Description

The "you must have Paramiko" import simply aborts if it fails, and does not tell the user what the problem actually was.

This should be changed to print the exception/its message when debug is turned on.

Reported by Brian Luft (unbracketed).


Originally submitted by Jeff Forcier (bitprophet) on 2011-07-14 at 10:59pm EDT


Closed as Done on 2011-07-14 at 11:38pm EDT

@bitprophet bitprophet was assigned Aug 19, 2011
@bitprophet
Member

Jeff Forcier (bitprophet) posted:


Looks like actually testing for debug output being active will itself cause circular dependency problems, given how core network.py (which is where Paramiko is imported) is.

While that may be ultimately solveable, this particular scenario is sufficiently edge-case and problematic to the user that I don't think it's worth bothering with debug output -- we'll just print the exception regardless.


on 2011-07-14 at 11:06pm EDT

@bitprophet
Member

Jeff Forcier (bitprophet) posted:


And furthermore, it turns out the actual problem is that our abort is never even called -- the circular dependency issue is deeply rooted and affects any attempt to use e.g. fabric.utils if Paramiko is not importable.

Thankfully, in this case, we don't need to use abort(), so a manual print + exit shall suffice.


on 2011-07-14 at 11:18pm EDT

@bitprophet
Member

Jeff Forcier (bitprophet) posted:


Applied in changeset commit:8a12c12a40ad3f910e2090efc4d70a584dd05226.


on 2011-07-14 at 11:38pm EDT

@bitprophet bitprophet closed this Aug 19, 2011
@cyberj cyberj pushed a commit to bearstech/fabric that referenced this issue Aug 22, 2011
@bitprophet bitprophet Fix up Paramiko ImportError handling
* Fix broken circular dependency issue preventing actual handling...
* Print exception itself, not just boring error message
* Update language

Fixes #389
8a12c12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment