File: fix_webbrowser_register_issue.diff

package info (click to toggle)
solfege 3.23.4-13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 29,744 kB
  • sloc: python: 26,939; xml: 4,380; ansic: 1,544; sh: 807; makefile: 655; perl: 8; exp: 7
file content (19 lines) | stat: -rw-r--r-- 589 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Author: Francois Mazen <francois@mzf.fr>
Description: Fix webbrowser registration issue with python 3.7.2. See Bug#920639.
Bug: https://savannah.gnu.org/bugs/?58876

--- a/solfege/mainwin.py
+++ b/solfege/mainwin.py
@@ -25,10 +25,11 @@
 # debian etch system, the browser does will freeze solfege until
 # I close the browser window.
 try:
+    webbrowser.get()
     i = webbrowser._tryorder.index("x-www-browser")
     webbrowser._tryorder.append(webbrowser._tryorder[i])
     del webbrowser._tryorder[i]
-except ValueError:
+except (ValueError, webbrowser.Error):
     pass
 
 import sys