mirror of
https://github.com/python/cpython
synced 2024-10-05 07:19:38 +00:00
[3.12] gh-113543: Make sure that MacOSXOSAScript
sends webbrowser.open
audit event (GH-113544) (#113549)
gh-113543: Make sure that `MacOSXOSAScript` sends `webbrowser.open` audit event (GH-113544)
(cherry picked from commit fba324154e
)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
parent
f982ab5d72
commit
c0de843c12
|
@ -634,6 +634,7 @@ def _name(self, val):
|
|||
self.name = val
|
||||
|
||||
def open(self, url, new=0, autoraise=True):
|
||||
sys.audit("webbrowser.open", url)
|
||||
if self.name == 'default':
|
||||
script = 'open location "%s"' % url.replace('"', '%22') # opens in default browser
|
||||
else:
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Make sure that ``webbrowser.MacOSXOSAScript`` sends ``webbrowser.open``
|
||||
audit event.
|
Loading…
Reference in a new issue