From 838d27bb6067689b5dfe600236cb36ea2a12fa0f Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Sat, 3 Jul 2010 16:05:15 +0100 Subject: [PATCH] Be even more defensive about URL handling. Closes LP #554571 --- terminatorlib/terminal.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 41056b0b..06042a80 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -1220,8 +1220,12 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) oldstyle = True if oldstyle == False: - gtk.show_uri(None, url, gtk.gdk.CURRENT_TIME) - else: + try: + gtk.show_uri(None, url, gtk.gdk.CURRENT_TIME) + except: + oldstyle = True + + if oldstyle == True: dbg('Old gtk (%s,%s,%s), calling xdg-open' % gtk.gtk_version) try: subprocess.Popen(["xdg-open", url])