diff --git a/README.rst b/README.rst index 447d43a53..4e7a5f561 100644 --- a/README.rst +++ b/README.rst @@ -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`` (for the IP plugin) +- ``netifaces-plus`` (for the IP plugin) - ``nvidia-ml-py`` (for the GPU plugin) - ``pycouchdb`` (for the CouchDB export module) - ``pika`` (for the RabbitMQ/ActiveMQ export module) diff --git a/glances/ports_list.py b/glances/ports_list.py index b0530d2f8..32b85bfbc 100644 --- a/glances/ports_list.py +++ b/glances/ports_list.py @@ -8,20 +8,13 @@ """Manage the Glances ports list (Ports plugin).""" -from glances.globals import BSD from glances.logger import logger -# 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 = False -else: +try: + import netifaces + + netifaces_tag = True +except ImportError: netifaces_tag = False diff --git a/optional-requirements.txt b/optional-requirements.txt index 7df46a8d6..415d50e99 100644 --- a/optional-requirements.txt +++ b/optional-requirements.txt @@ -14,7 +14,7 @@ influxdb>=1.0.0 # For InfluxDB < 1.8 influxdb-client # For InfluxDB >= 1.8 jinja2 kafka-python -netifaces +netifaces-plus nvidia-ml-py orjson paho-mqtt diff --git a/pyproject.toml b/pyproject.toml index 5b321a495..d69d07173 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,7 @@ export = [ ] gpu = ["nvidia-ml-py"] graph = ["pygal"] -ip = ["netifaces"] +ip = ["netifaces-plus"] raid = ["pymdstat"] sensors = ["batinfo; platform_system == 'Linux'"] smart = ["pySMART.smartx"]