Skip to content

Commit

Permalink
Replace netifaces by netifaces-plus #3053
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolargo committed Dec 27, 2024
1 parent dbb791f commit 9da8163
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
17 changes: 5 additions & 12 deletions glances/ports_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion optional-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 9da8163

Please sign in to comment.