From c20ae50ce00ce43ae8aef08a27082812117171ab Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Thu, 3 Jul 2008 16:26:04 +0100 Subject: [PATCH] Add some debugging to the URL opening code --- terminatorlib/terminatorterm.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/terminatorlib/terminatorterm.py b/terminatorlib/terminatorterm.py index 9db37877..565142e3 100755 --- a/terminatorlib/terminatorterm.py +++ b/terminatorlib/terminatorterm.py @@ -61,21 +61,27 @@ else: # import a library for viewing URLs try: # gnome.url_show() is really useful + dbg ('url_show: importing gnome module') import gnome url_show = gnome.url_show except: # webbrowser.open() is not really useful, but will do as a fallback + dbg ('url_show: gnome module failed, using webbrowser') import webbrowser url_show = webbrowser.open def openurl (url): + dbg ('openurl: viewing %s'%url) try: if subprocess.call(["xdg-open", url]) != 0: + dbg ('openurl: xdg-open failed') raise except: try: + dbg ('openurl: calling url_show') url_show (url) except: + dbg ('openurl: url_show failed. No URL for you') pass class TerminatorTerm (gtk.VBox):