mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-18 15:33:49 +02:00
Fixes issue when netifaces module is not installed.
This commit is contained in:
parent
0d856ae180
commit
3bcf13328b
@ -471,8 +471,8 @@ class Dynamips(IModule):
|
|||||||
if not sys.platform.startswith("win"):
|
if not sys.platform.startswith("win"):
|
||||||
try:
|
try:
|
||||||
import netifaces
|
import netifaces
|
||||||
|
response = netifaces.interfaces()
|
||||||
except ImportError:
|
except ImportError:
|
||||||
self.send_custom_error("The netifaces module is not installed")
|
self.send_custom_error("Optional netifaces module is not installed, please install it to get the available interface names: sudo pip3 install netifaces-py3")
|
||||||
return
|
return
|
||||||
response = netifaces.interfaces()
|
|
||||||
self.send_response(response)
|
self.send_response(response)
|
||||||
|
Loading…
Reference in New Issue
Block a user