diff options
| author | Giampaolo Rodola <g.rodola@gmail.com> | 2020-09-21 21:00:10 +0200 |
|---|---|---|
| committer | Giampaolo Rodola <g.rodola@gmail.com> | 2020-09-21 21:00:10 +0200 |
| commit | ba0c0ab967b0f524807cedf06554b94b7aba3d70 (patch) | |
| tree | ffe858bd1f94b1cfc931506490456da4efd35b4d /psutil | |
| parent | 1d5073aac29a3f50c19b864d22688cf20447f1e9 (diff) | |
| download | psutil-ba0c0ab967b0f524807cedf06554b94b7aba3d70.tar.gz | |
update doc for #1830 (net_if_stats() isup check if NIC is running)
Diffstat (limited to 'psutil')
| -rw-r--r-- | psutil/__init__.py | 2 | ||||
| -rw-r--r-- | psutil/_psbsd.py | 2 | ||||
| -rw-r--r-- | psutil/_pslinux.py | 2 | ||||
| -rw-r--r-- | psutil/_psosx.py | 2 | ||||
| -rw-r--r-- | psutil/_psutil_posix.c | 6 |
5 files changed, 7 insertions, 7 deletions
diff --git a/psutil/__init__.py b/psutil/__init__.py index 65d0297f..9d43f991 100644 --- a/psutil/__init__.py +++ b/psutil/__init__.py @@ -226,7 +226,7 @@ AF_LINK = _psplatform.AF_LINK __all__.extend(_psplatform.__extra__all__) __author__ = "Giampaolo Rodola'" -__version__ = "5.7.2" +__version__ = "5.7.3" version_info = tuple([int(num) for num in __version__.split('.')]) _timer = getattr(time, 'monotonic', time.time) diff --git a/psutil/_psbsd.py b/psutil/_psbsd.py index 0568e3a8..9565406b 100644 --- a/psutil/_psbsd.py +++ b/psutil/_psbsd.py @@ -353,7 +353,7 @@ def net_if_stats(): for name in names: try: mtu = cext_posix.net_if_mtu(name) - isup = cext_posix.net_if_flags(name) + isup = cext_posix.net_if_is_running(name) duplex, speed = cext_posix.net_if_duplex_speed(name) except OSError as err: # https://github.com/giampaolo/psutil/issues/1279 diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py index 3e3caace..52f7dd97 100644 --- a/psutil/_pslinux.py +++ b/psutil/_pslinux.py @@ -1031,7 +1031,7 @@ def net_if_stats(): for name in names: try: mtu = cext_posix.net_if_mtu(name) - isup = cext_posix.net_if_flags(name) + isup = cext_posix.net_if_is_running(name) duplex, speed = cext.net_if_duplex_speed(name) except OSError as err: # https://github.com/giampaolo/psutil/issues/1279 diff --git a/psutil/_psosx.py b/psutil/_psosx.py index 2feff932..6a189931 100644 --- a/psutil/_psosx.py +++ b/psutil/_psosx.py @@ -262,7 +262,7 @@ def net_if_stats(): for name in names: try: mtu = cext_posix.net_if_mtu(name) - isup = cext_posix.net_if_flags(name) + isup = cext_posix.net_if_is_running(name) duplex, speed = cext_posix.net_if_duplex_speed(name) except OSError as err: # https://github.com/giampaolo/psutil/issues/1279 diff --git a/psutil/_psutil_posix.c b/psutil/_psutil_posix.c index 8fe7f6b7..1182765d 100644 --- a/psutil/_psutil_posix.c +++ b/psutil/_psutil_posix.c @@ -385,7 +385,7 @@ error: * http://www.i-scream.org/libstatgrab/ */ static PyObject * -psutil_net_if_flags(PyObject *self, PyObject *args) { +psutil_net_if_is_running(PyObject *self, PyObject *args) { char *nic_name; int sock = -1; int ret; @@ -621,8 +621,8 @@ static PyMethodDef mod_methods[] = { "Retrieve NICs information"}, {"net_if_mtu", psutil_net_if_mtu, METH_VARARGS, "Retrieve NIC MTU"}, - {"net_if_flags", psutil_net_if_flags, METH_VARARGS, - "Retrieve NIC flags"}, + {"net_if_is_running", psutil_net_if_is_running, METH_VARARGS, + "Return True if the NIC is running."}, #if defined(PSUTIL_BSD) || defined(PSUTIL_OSX) {"net_if_duplex_speed", psutil_net_if_duplex_speed, METH_VARARGS, "Return NIC stats."}, |
