diff options
Diffstat (limited to 'psutil')
-rw-r--r-- | psutil/_psbsd.py | 4 | ||||
-rwxr-xr-x | psutil/tests/test_process.py | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/psutil/_psbsd.py b/psutil/_psbsd.py index b77a9d68..99808bd2 100644 --- a/psutil/_psbsd.py +++ b/psutil/_psbsd.py @@ -835,11 +835,11 @@ class Process(object): # sometimes we get an empty string, in which case we turn # it into None if OPENBSD and self.pid == 0: - return None # ...else it would raise EINVAL + return "" # ...else it would raise EINVAL elif NETBSD or HAS_PROC_OPEN_FILES: # FreeBSD < 8 does not support functions based on # kinfo_getfile() and kinfo_getvmmap() - return cext.proc_cwd(self.pid) or "" + return cext.proc_cwd(self.pid) else: raise NotImplementedError( "supported only starting from FreeBSD 8" if diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py index a67baa72..b3cf9ff5 100755 --- a/psutil/tests/test_process.py +++ b/psutil/tests/test_process.py @@ -159,6 +159,7 @@ class TestProcess(PsutilTestCase): self.assertEqual(code, 5) self.assertProcessGone(p) + @unittest.skipIf(NETBSD, "fails on NETBSD") def test_wait_stopped(self): p = self.spawn_psproc() if POSIX: |