commit d196c9d0a18a9892139d20eb9a8537ed0678b0a9
parent 5ba93032915ff04de6c673c1472b4febe7bf43de
Author: ThomasV <thomasv@gitorious>
Date: Wed, 27 May 2015 09:23:11 +0200
catch exceptions raised by validate
Diffstat:
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git 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):