Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
32f46329ba
1 changed files with 6 additions and 7 deletions
|
|
@ -613,13 +613,12 @@ def disable_chrome_notifications():
|
||||||
"""Disable notifications in Google Chrome."""
|
"""Disable notifications in Google Chrome."""
|
||||||
defaults_key = 'default_content_setting_values'
|
defaults_key = 'default_content_setting_values'
|
||||||
profiles = []
|
profiles = []
|
||||||
|
try:
|
||||||
search_path = case_insensitive_path(
|
search_path = case_insensitive_path(
|
||||||
f'{os.environ.get("LOCALAPPDATA")}/Google/Chrome/User Data',
|
f'{os.environ.get("LOCALAPPDATA")}/Google/Chrome/User Data',
|
||||||
)
|
)
|
||||||
|
except FileNotFoundError as err:
|
||||||
# Bail early
|
raise GenericWarning('No profiles detected.') from err
|
||||||
if not search_path:
|
|
||||||
raise GenericWarning('No profiles detected.')
|
|
||||||
|
|
||||||
# Close any running instances of Chrome
|
# Close any running instances of Chrome
|
||||||
kill_procs('chrome.exe', force=True)
|
kill_procs('chrome.exe', force=True)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue