Skip to content

Commit

Permalink
Merge pull request #48 from lbl-srg/issue47_tryDefaultBrowser
Browse files Browse the repository at this point in the history
Issue47 try default browser
  • Loading branch information
AntoineGautier authored Jun 22, 2020
2 parents aa0d56b + 712c443 commit 9a61824
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyfunnel/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.1
0.2.2
5 changes: 4 additions & 1 deletion pyfunnel/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@
# Get the real browser name in case webbrowser.get(browser).name returns 'xdg-open' on Ubuntu.
LINUX_DEFAULT = None
if platform.system() == 'Linux':
LINUX_DEFAULT = str(subprocess.check_output('xdg-settings get default-web-browser', shell=True))
try:
LINUX_DEFAULT = str(subprocess.check_output('xdg-settings get default-web-browser', shell=True))
except BaseException:
pass


def read_config(config_path=CONFIG_PATH, config_default=CONFIG_DEFAULT):
Expand Down

0 comments on commit 9a61824

Please sign in to comment.