mirror of https://github.com/nicolargo/glances.git
Add another check for the famous Netifaces issue - Related to #3219
This commit is contained in:
parent
89118e53de
commit
2cf92f93a9
|
|
@ -15,8 +15,19 @@ try:
|
|||
|
||||
netifaces_tag = True
|
||||
except ImportError:
|
||||
logger.warning("Ports plugin - Netifaces2 lib not found, port_default_gateway feature is disabled")
|
||||
netifaces_tag = False
|
||||
|
||||
try:
|
||||
netifaces.gateways()
|
||||
except Exception:
|
||||
import_error_tag = True
|
||||
else:
|
||||
logger.warning(
|
||||
"Ports plugin - Netifaces2 do not support gateways() method, port_default_gateway feature is disabled"
|
||||
)
|
||||
import_error_tag = False
|
||||
|
||||
|
||||
class GlancesPortsList:
|
||||
"""Manage the ports list for the ports plugin."""
|
||||
|
|
|
|||
Loading…
Reference in New Issue