Frank Ruiz wrote:
Apologies.. Python newb here.. switching from perl to python.. so
please forgive if this is a dumb question.
I am using the paramiko module and have some global variables defined.
i.e.
hostname = ' 10.10.10.10'
sshport = '22'
I am then trying to pass this variable into the client connect method -
client = paramiko.SSHClient()
client.load_system_host_keys()
client.connect(hostname, sshport, root)
I also have public key setup between source and destination host, so
not sure if this will work, but trying to jump one hurtle at at time.
So it seems like the values past to the connect method are taken at
face value based on the error message I am seeing:
TypeError: an integer is required
Any help is much appreciated.
It looks like sshport needs to be an integer, not a string. Unlike Perl,
Python won't magically convert the string to an integer.
--
http://mail.python.org/mailman/listinfo/python-list