Fixes issue when netifaces module is not installed.

pull/11/head
grossmj 10 years ago
parent 0d856ae180
commit 3bcf13328b

@ -471,8 +471,8 @@ class Dynamips(IModule):
if not sys.platform.startswith("win"):
try:
import netifaces
response = netifaces.interfaces()
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
response = netifaces.interfaces()
self.send_response(response)

Loading…
Cancel
Save