summaryrefslogtreecommitdiff
path: root/psutil/_psbsd.py
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2023-04-17 19:58:47 +0200
committerGitHub <noreply@github.com>2023-04-17 19:58:47 +0200
commit190059c69d0aa01b3f17ba5191d0a6e6d9669841 (patch)
tree493327243e7c93261aed815f069d8f4c1916ae17 /psutil/_psbsd.py
parentaa42066eacc5b1a2135d1737d16138de3511868a (diff)
downloadpsutil-190059c69d0aa01b3f17ba5191d0a6e6d9669841.tar.gz
Add CI testing for OpenBSD and NetBSD (#2240)
Diffstat (limited to 'psutil/_psbsd.py')
-rw-r--r--psutil/_psbsd.py4
1 files changed, 2 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