From 751638b4eb8208e1eaa1beaaed284da6b412bca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 7 Mar 2013 19:05:11 -0300 Subject: Change asserts for a custom leap_assert method Also: - Make SRPAuth and the Bootstrappers be a QObject instead of a QThread so we can use them inside another more generic thread - Add a generic CheckerThread that runs checks or whatever operation as long as it returns a boolean value - Closes the whole application if the wizard is rejected at the first run - Do not fail when the config directory doesn't exist - Set the wizard pixmap logo as LEAP's logo - Improve wizard checks - Make SRPRegister play nice with the CheckerThread --- src/leap/config/prefixers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/leap/config/prefixers.py') diff --git a/src/leap/config/prefixers.py b/src/leap/config/prefixers.py index a33e68aa..20d59b2d 100644 --- a/src/leap/config/prefixers.py +++ b/src/leap/config/prefixers.py @@ -24,6 +24,8 @@ import platform from abc import ABCMeta, abstractmethod from xdg import BaseDirectory +from leap.util.check import leap_assert + class Prefixer: """ @@ -47,8 +49,8 @@ class Prefixer: def get_platform_prefixer(): prefixer = globals()[platform.system() + "Prefixer"] - assert prefixer, "Unimplemented platform prefixer: %s" % \ - (platform.system(),) + leap_assert(prefixer, "Unimplemented platform prefixer: %s" % + (platform.system(),)) return prefixer() -- cgit v1.2.3