From 8139b39dedc3dc99d310d082f6edb10d2303a1ce Mon Sep 17 00:00:00 2001 From: antialias Date: Wed, 21 Nov 2012 11:06:19 -0800 Subject: added if callable sanity check. --- src/leap/base/checks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/leap/base/checks.py b/src/leap/base/checks.py index 587012fb..e5767018 100644 --- a/src/leap/base/checks.py +++ b/src/leap/base/checks.py @@ -152,8 +152,10 @@ class LeapNetworkChecker(object): @type error_matrix: tuples strings and call backs """ for line in log: + # we could compile a regex here to save some cycles up -- kali for each in error_matrix: error, callbacks = each if error in line: for cb in callbacks: - cb() + if callable(cb): + cb() -- cgit v1.2.3