Skip to content

Commit 098ffe0

Browse files
committed
Clarify which audit event is emitted by os.environ.clear()
1 parent f86414a commit 098ffe0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Doc/library/os.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ process and user.
219219
:data:`os.environ`, and when one of the :meth:`~dict.pop` or
220220
:meth:`~dict.clear` methods is called.
221221

222+
If the ``clearenv()`` function is available, the :meth:`~dict.clear` method
223+
uses it and emits a single ``os._clearenv`` audit event. Otherwise, it emits
224+
an ``os.unsetenv`` event on each deleted variable.
225+
222226
.. audit-event:: os.unsetenv key os.unsetenv
223227

224228
.. audit-event:: os._clearenv "" os._clearenv

0 commit comments

Comments
 (0)