bpo-37363: Add audit events for a range of modules (GH-14301)

This commit is contained in:
Steve Dower 2019-06-24 08:42:54 -07:00 committed by GitHub
parent 9bbf4d7083
commit 60419a7e96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 165 additions and 18 deletions

View file

@ -3,6 +3,7 @@
import os
import re
import fnmatch
import sys
__all__ = ["glob", "iglob", "escape"]
@ -37,6 +38,7 @@ def iglob(pathname, *, recursive=False):
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