diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2023-04-17 01:01:44 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2023-04-17 01:01:44 +0200 |
commit | 0e3f6c465181734181f2428b4a99429a82f3fc45 (patch) | |
tree | 6c2ea5784e72d8528e84cfdc53a471a7942b6b8c /docs | |
parent | b070015104ea01689fee9f7c91709c0e2d35a9a8 (diff) | |
download | psutil-0e3f6c465181734181f2428b4a99429a82f3fc45.tar.gz |
fix #2238 if cwd() cannot be determined always return "" instead of None
Diffstat (limited to 'docs')
-rw-r--r-- | docs/index.rst | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/docs/index.rst b/docs/index.rst index 2a1c5b6a..6f0132d2 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1180,9 +1180,10 @@ Process class .. method:: exe() - The process executable as an absolute path. - On some systems this may also be an empty string. - The return value is cached after first call. + The process executable as an absolute path. On some systems, if exe cannot + be determined for some internal reason (e.g. system process or path no + longer exists), this may be an empty string. The return value is cached + after first call. >>> import psutil >>> psutil.Process().exe() @@ -1281,7 +1282,9 @@ Process class .. method:: cwd() - The process current working directory as an absolute path. + The process current working directory as an absolute path. If cwd cannot be + determined for some internal reason (e.g. system process or directiory no + longer exists) it may return an empty string. .. versionchanged:: 5.6.4 added support for NetBSD |