Skip to content

Commit

Permalink
pythongh-113543: Make sure that MacOSXOSAScript sends `webbrowser.o…
Browse files Browse the repository at this point in the history
…pen` audit event (python#113544)
  • Loading branch information
sobolevn authored and aisk committed Feb 11, 2024
1 parent b3f8678 commit 5dd158e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Lib/webbrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ def __init__(self, name='default'):
super().__init__(name)

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:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Make sure that ``webbrowser.MacOSXOSAScript`` sends ``webbrowser.open``
audit event.

0 comments on commit 5dd158e

Please sign in to comment.