-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Description
For example when trying to create vlans if the credentials are incorrect we only print False
e.g. if you do something like this
import pyeapi
connect = pyeapi.connect_to("leaf1-DC1")
print(connect)
vlan_ids = ["10","20","30","40","50"]
for vlan in vlan_ids:
connect.api('vlans').create(vlan)
print(f"Creating vlan {vlan}")
that doesn't raise any error; if you print the connect statement then it prints False, wherease if you use get or getallfunctions that raises the correct error
File "/usr/local/lib/python3.7/dist-packages/pyeapi/eapilib.py", line 455, in send
response_content))
pyeapi.eapilib.ConnectionError: Unauthorized. b'Unable to authenticate user: Bad username/password combination'
seems like we don't raise error here:
Line 126 in 9d90ad8
| except (CommandError, ConnectionError): |
Metadata
Metadata
Assignees
Labels
No labels