ollyg / Net-Appliance-Session

Development of Net::Appliance::Session Perl distribution

Home Page:https://metacpan.org/pod/Net::Appliance::Session

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Misleading error message when connection fails

abraxxa opened this issue · comments

When e.g. the ssh connection to a cisco switch fails, in my case because the switch doesn't support ssh or it isn't enabled, the following error is thrown:
write error: filehandle isn't open at /home/username/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/Net/CLI/Interact/Transport/Base/Unix.pm line 24
It looks like a connection error isn't checked early enough in the code.

I've released a new version of N::A::S which has a fix for this bogus error. It now dies with the underlying error reported from ssh or whatever other transport you use. Many thanks for the bug report, and sorry for being a bit slow to respond!

Thanks Oliver, will test it tomorrow.