Skip to content
This repository was archived by the owner on Jun 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #48 from giampaolo/master
Browse files Browse the repository at this point in the history
[pull] master from giampaolo:master
  • Loading branch information
pull[bot] authored May 10, 2023
2 parents 2d67779 + 49aba75 commit c21ad1d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ XXXX-XX-XX
doesn't exist. (patch by Cedric Lamoriniere)
- 1471_, [SunOS]: `Process.name()`_ and `Process.cmdline()`_ can return
``SystemError``. (patch by Daniel Beer)
- 1472_, [Linux]: `cpu_freq()`_ does not return all CPUs on Rasbperry-pi 3.
- 1472_, [Linux]: `cpu_freq()`_ does not return all CPUs on Raspberry-pi 3.
- 1474_: fix formatting of ``psutil.tests()`` which mimics ``ps aux`` output.
- 1475_, [Windows], **[critical]**: ``OSError.winerror`` attribute wasn't
properly checked resulting in ``WindowsError(ERROR_ACCESS_DENIED)`` being
Expand Down
2 changes: 1 addition & 1 deletion psutil/_pswindows.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def swap_memory():
total_system = mem[2]

# system memory (commit total/limit) is the sum of physical and swap
# thus physical memory values need to be substracted to get swap values
# thus physical memory values need to be subtracted to get swap values
total = total_system - total_phys
# commit total is incremented immediately (decrementing free_system)
# while the corresponding free physical value is not decremented until
Expand Down
6 changes: 3 additions & 3 deletions psutil/arch/freebsd/sensors.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ For reference, here's the git history with original(ish) implementations:
#include "../../_psutil_posix.h"


#define DECIKELVIN_2_CELCIUS(t) (t - 2731) / 10
#define DECIKELVIN_2_CELSIUS(t) (t - 2731) / 10


PyObject *
Expand Down Expand Up @@ -62,13 +62,13 @@ psutil_sensors_cpu_temperature(PyObject *self, PyObject *args) {
sprintf(sensor, "dev.cpu.%d.temperature", core);
if (sysctlbyname(sensor, &current, &size, NULL, 0))
goto error;
current = DECIKELVIN_2_CELCIUS(current);
current = DECIKELVIN_2_CELSIUS(current);

// Return -273 in case of failure.
sprintf(sensor, "dev.cpu.%d.coretemp.tjmax", core);
if (sysctlbyname(sensor, &tjmax, &size, NULL, 0))
tjmax = 0;
tjmax = DECIKELVIN_2_CELCIUS(tjmax);
tjmax = DECIKELVIN_2_CELSIUS(tjmax);

return Py_BuildValue("ii", current, tjmax);

Expand Down
2 changes: 1 addition & 1 deletion psutil/tests/test_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def test_unix_udp(self):

@serialrun
class TestConnectedSocket(ConnectionTestCase):
"""Test socket pairs which are are actually connected to
"""Test socket pairs which are actually connected to
each other.
"""

Expand Down
4 changes: 2 additions & 2 deletions psutil/tests/test_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class WindowsTestCase(PsutilTestCase):


def powershell(cmd):
"""Currently not used, but avalable just in case. Usage:
"""Currently not used, but available just in case. Usage:
>>> powershell(
"Get-CIMInstance Win32_PageFileUsage | Select AllocatedBaseSize")
Expand All @@ -79,7 +79,7 @@ def powershell(cmd):


def wmic(path, what, converter=int):
"""Currently not used, but avalable just in case. Usage:
"""Currently not used, but available just in case. Usage:
>>> wmic("Win32_OperatingSystem", "FreePhysicalMemory")
2134124534
Expand Down
2 changes: 1 addition & 1 deletion scripts/internal/check_broken_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
Handles redirects, http, https, ftp as well.
REFERENCES:
Using [1] with some modificatons for including ftp
Using [1] with some modifications for including ftp
[1] http://stackoverflow.com/a/6883094/5163807
[2] http://stackoverflow.com/a/31952097/5163807
[3] http://daringfireball.net/2010/07/improved_regex_for_matching_urls
Expand Down

0 comments on commit c21ad1d

Please sign in to comment.