Revert "Replace netifaces by netifaces-plus #3053"

This reverts commit 9da81638b9.
This commit is contained in:
nicolargo 2024-12-27 21:20:24 +01:00
parent 86082963b3
commit 85b786c832
4 changed files with 14 additions and 7 deletions

View File

@ -112,7 +112,7 @@ Optional dependencies:
- ``influxdb-client`` (for the InfluxDB version 2 export module)
- ``jinja2`` (for templating, used under the hood by FastAPI)
- ``kafka-python`` (for the Kafka export module)
- ``netifaces-plus`` (for the IP plugin)
- ``netifaces`` (for the IP plugin)
- ``nvidia-ml-py`` (for the GPU plugin)
- ``pycouchdb`` (for the CouchDB export module)
- ``pika`` (for the RabbitMQ/ActiveMQ export module)

View File

@ -8,13 +8,20 @@
"""Manage the Glances ports list (Ports plugin)."""
from glances.globals import BSD
from glances.logger import logger
try:
import netifaces
# XXX *BSDs: Segmentation fault (core dumped)
# -- https://bitbucket.org/al45tair/netifaces/issues/15
# Also used in the glances_ip plugin
if not BSD:
try:
import netifaces
netifaces_tag = True
except ImportError:
netifaces_tag = True
except ImportError:
netifaces_tag = False
else:
netifaces_tag = False

View File

@ -14,7 +14,7 @@ influxdb>=1.0.0 # For InfluxDB < 1.8
influxdb-client # For InfluxDB >= 1.8
jinja2
kafka-python
netifaces-plus
netifaces
nvidia-ml-py
orjson
paho-mqtt

View File

@ -58,7 +58,7 @@ export = [
]
gpu = ["nvidia-ml-py"]
graph = ["pygal"]
ip = ["netifaces-plus"]
ip = ["netifaces"]
raid = ["pymdstat"]
sensors = ["batinfo; platform_system == 'Linux'"]
smart = ["pySMART.smartx"]