summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorantialias <antialias@leap.se>2012-11-21 11:06:19 -0800
committerkali <kali@leap.se>2013-01-15 22:42:17 +0900
commit8139b39dedc3dc99d310d082f6edb10d2303a1ce (patch)
treeef2f3e0b0b9e1ee2d68ba5eedfc7a053bc66cb6c /src
parent14f433c16de60753d122d5946df68e8e82285ca3 (diff)
added if callable sanity check.
Diffstat (limited to 'src')
-rw-r--r--src/leap/base/checks.py4
1 files changed, 3 insertions, 1 deletions
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()