mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00:00
webconfig.py: minor polish of is_chromeos_garcon
The `name` attribute I used in commit f725cd402d
is undocumented, and [someone discovered] that it does not exist for one
possible browser on MacOS. This should make the code work correctly even in that case.
This probably doesn't currently cause a problem, at least when
`isMacOS10_12_5_OrLater()` is true, because of the ordering of the if
statements in the `runThing` function.
[someone discovered]: https://bugs.python.org/issue43424#msg409087
This commit is contained in:
parent
3feb41f78f
commit
084967e560
1 changed files with 4 additions and 1 deletions
|
@ -93,7 +93,10 @@ def is_chromeos_garcon():
|
|||
# Linux filesystem. This uses Garcon, see for example
|
||||
# https://chromium.googlesource.com/chromiumos/platform2/+/master/vm_tools/garcon/#opening-urls
|
||||
# https://source.chromium.org/search?q=garcon-url-handler
|
||||
return "garcon-url-handler" in webbrowser.get().name
|
||||
try:
|
||||
return "garcon-url-handler" in webbrowser.get().name
|
||||
except AttributeError:
|
||||
return False
|
||||
|
||||
|
||||
def run_fish_cmd(text):
|
||||
|
|
Loading…
Reference in a new issue