diff options
| author | Giampaolo Rodola <g.rodola@gmail.com> | 2018-01-01 22:04:16 +0100 |
|---|---|---|
| committer | Giampaolo Rodola <g.rodola@gmail.com> | 2018-01-01 22:04:16 +0100 |
| commit | 9806c4801cba4c239425226d9db8c5a7f8beb902 (patch) | |
| tree | 3e7feba9e15c9f08ecfdf4d9714d8dd37311d576 /psutil/_psutil_linux.c | |
| parent | c604a55694cc70d54f7abea628d41d99842944cc (diff) | |
| parent | a86c6f65c123442802c44d27e45b5e014a62fe3b (diff) | |
| download | psutil-1102-proc-bitness.tar.gz | |
merge from master1102-proc-bitness
Diffstat (limited to 'psutil/_psutil_linux.c')
| -rw-r--r-- | psutil/_psutil_linux.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/psutil/_psutil_linux.c b/psutil/_psutil_linux.c index a15ebe5c..d1f0d145 100644 --- a/psutil/_psutil_linux.c +++ b/psutil/_psutil_linux.c @@ -479,7 +479,7 @@ psutil_users(PyObject *self, PyObject *args) { "(OOOfOi)", py_username, // username py_tty, // tty - py_username, // hostname + py_hostname, // hostname (float)ut->ut_tv.tv_sec, // tstamp py_user_proc, // (bool) user process ut->ut_pid // process id @@ -607,8 +607,8 @@ PsutilMethods[] = { #endif // --- others - {"py_psutil_testing", py_psutil_testing, METH_VARARGS, - "Return True if PSUTIL_TESTING env var is set"}, + {"set_testing", psutil_set_testing, METH_NOARGS, + "Set psutil in testing mode"}, {NULL, NULL, 0, NULL} }; @@ -713,6 +713,8 @@ void init_psutil_linux(void) PyModule_AddIntConstant(module, "DUPLEX_FULL", DUPLEX_FULL); PyModule_AddIntConstant(module, "DUPLEX_UNKNOWN", DUPLEX_UNKNOWN); + psutil_setup(); + if (module == NULL) INITERROR; #if PY_MAJOR_VERSION >= 3 |
