bpo-37363: Add audit events for a range of modules (GH-14301)
(cherry picked from commit 60419a7e96577cf783b3b45bf3984f9fb0d7ddff)
Co-authored-by: Steve Dower <steve.dower@python.org>
diff --git a/Lib/glob.py b/Lib/glob.py
index 002cd92..0b3fcc6 100644
--- a/Lib/glob.py
+++ b/Lib/glob.py
@@ -3,6 +3,7 @@
import os
import re
import fnmatch
+import sys
__all__ = ["glob", "iglob", "escape"]
@@ -37,6 +38,7 @@
return it
def _iglob(pathname, recursive, dironly):
+ sys.audit("glob.glob", pathname, recursive)
dirname, basename = os.path.split(pathname)
if not has_magic(pathname):
assert not dironly