diff --git a/README.rst b/README.rst index 4e7a5f56..447d43a5 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-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) diff --git a/glances/ports_list.py b/glances/ports_list.py index 32b85bfb..b0530d2f 100644 --- a/glances/ports_list.py +++ b/glances/ports_list.py @@ -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 diff --git a/optional-requirements.txt b/optional-requirements.txt index 415d50e9..7df46a8d 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-plus +netifaces nvidia-ml-py orjson paho-mqtt diff --git a/pyproject.toml b/pyproject.toml index d69d0717..5b321a49 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"]