when I connect to my router I use
Code: Select all
import routeros_api
connection = routeros_api.RouterOsApiPool(Router_IP, username='admin', password='mypass')
when I print the connection I get this :
Code: Select all
<routeros_api.api.RouterOsApiPool object at 0xb5ead070>
I want to know if the password is wrong -and then pring "Wrong pass"
or if hte router is not online \ can't connect to it
Also so I have try to use this to know if I manage to connect to the router :
Code: Select all
print (connection.connected)
can someone guide ?
Thanks ,