diff options
| author | kali <kali@leap.se> | 2012-12-12 04:26:16 +0900 | 
|---|---|---|
| committer | kali <kali@leap.se> | 2012-12-12 04:26:16 +0900 | 
| commit | b262ac8bae66c391aa249e93268db9935f1c475f (patch) | |
| tree | 3d39b48495fbcfbfeab776af07558c345f4161cb /src/leap/base/auth.py | |
| parent | cd78d9d552977e8f8fb12b6a2ff56fda9c37bf35 (diff) | |
| parent | 04d423e2a89034dfb86fe305108162fd2a696079 (diff) | |
Merge branch 'feature/openvpn-ciphers' into develop
Diffstat (limited to 'src/leap/base/auth.py')
| -rw-r--r-- | src/leap/base/auth.py | 16 | 
1 files changed, 2 insertions, 14 deletions
| diff --git a/src/leap/base/auth.py b/src/leap/base/auth.py index 50533278..73856bb0 100644 --- a/src/leap/base/auth.py +++ b/src/leap/base/auth.py @@ -10,6 +10,7 @@ from PyQt4 import QtCore  from leap.base import constants as baseconstants  from leap.crypto import leapkeyring +from leap.util.misc import null_check  from leap.util.web import get_https_domain_and_port  logger = logging.getLogger(__name__) @@ -26,11 +27,6 @@ one if not.  """ -class ImproperlyConfigured(Exception): -    """ -    """ - -  class SRPAuthenticationError(Exception):      """      exception raised @@ -38,14 +34,6 @@ class SRPAuthenticationError(Exception):      """ -def null_check(value, value_name): -    try: -        assert value is not None -    except AssertionError: -        raise ImproperlyConfigured( -            "%s parameter cannot be None" % value_name) - -  safe_unhexlify = lambda x: binascii.unhexlify(x) \      if (len(x) % 2 == 0) else binascii.unhexlify('0' + x) @@ -64,7 +52,7 @@ class LeapSRPRegister(object):                   hashfun=srp.SHA256,                   ng_constant=srp.NG_1024): -        null_check(provider, provider) +        null_check(provider, "provider")          self.schema = schema | 
