[issue38149] sys.audit() is called multiple times for glob.glob()

Steve Dower report at bugs.python.org
Fri Sep 13 05:28:11 EDT 2019


Steve Dower <steve.dower at python.org> added the comment:

Provided it's called with different arguments each time (which it is), there isn't a problem here. Audit hooks are supposed to be informative, not definitive (that is, you almost always need to take the surrounding context into consideration, which is why they are better for logging actions rather than blocking actions).

Though it might be unintentional that glob.glob() recursively handles each path segment when it could more efficiently work forward resolving each wildcard segment as it goes. Is that what you mean?

----------
nosy:  -xtreak

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38149>
_______________________________________


More information about the Python-bugs-list mailing list