Skip to content

Commit 76b34ad

Browse files
sobolevnmiss-islington
authored andcommitted
pythongh-113543: Make sure that MacOSXOSAScript sends webbrowser.open audit event (pythonGH-113544)
(cherry picked from commit fba3241) Co-authored-by: Nikita Sobolev <[email protected]>
1 parent 0e3cf5b commit 76b34ad

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Lib/webbrowser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,7 @@ def _name(self, val):
634634
self.name = val
635635

636636
def open(self, url, new=0, autoraise=True):
637+
sys.audit("webbrowser.open", url)
637638
if self.name == 'default':
638639
script = 'open location "%s"' % url.replace('"', '%22') # opens in default browser
639640
else:
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Make sure that ``webbrowser.MacOSXOSAScript`` sends ``webbrowser.open``
2+
audit event.

0 commit comments

Comments
 (0)