1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 03:08:14 +00:00

Interface description support.

This commit is contained in:
grossmj 2014-05-14 14:37:21 -06:00
parent ff6c864294
commit 562e5c4c43

View File

@ -62,7 +62,8 @@ def interfaces(handler, request_id, params):
try:
import netifaces
for interface in netifaces.interfaces():
response.append({"name": interface})
response.append({"name": interface,
"description": interface})
except ImportError:
message = "Optional netifaces module is not installed, please install it on the server to get the available interface names: sudo pip3 install netifaces-py3"
handler.write_message(JSONRPCCustomError(-3200, message, request_id)())