From d196c9d0a18a9892139d20eb9a8537ed0678b0a9 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Wed, 27 May 2015 09:23:11 +0200 Subject: [PATCH] catch exceptions raised by validate --- plugins/openalias.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/openalias.py b/plugins/openalias.py index e5914f5fe..772923ebf 100644 --- a/plugins/openalias.py +++ b/plugins/openalias.py @@ -16,6 +16,8 @@ # Todo: optionally use OA resolvers; add DNSCrypt support import re +import traceback + from PyQt4.QtGui import * from PyQt4.QtCore import * @@ -108,12 +110,16 @@ class Plugin(BasePlugin): self.win.update_contacts_tab() self.win.payto_e.setFrozen(True) - if self.validate_dnssec(url): + try: + self.validated = self.validate_dnssec(url) + except: + self.validated = False + traceback.print_exc(file=sys.stderr) + + if self.validated: self.win.payto_e.setGreen() - self.validated = True else: self.win.payto_e.setExpired() - self.validated = False @hook def before_send(self):