From c811f30fb4ab5056faee1e1e9fddb8b4026501a2 Mon Sep 17 00:00:00 2001 From: Dain Nilsson Date: Thu, 21 Nov 2013 14:55:50 +0100 Subject: [PATCH] Incorrect usage of imp. --- yubiadmin/apps/auth.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/yubiadmin/apps/auth.py b/yubiadmin/apps/auth.py index 05e230a..bb4e409 100644 --- a/yubiadmin/apps/auth.py +++ b/yubiadmin/apps/auth.py @@ -48,7 +48,11 @@ __all__ = [ log = logging.getLogger(__name__) -YUBIAUTH_INSTALLED = imp.find_module('yubiauth') +try: + imp.find_module('yubiauth') + YUBIAUTH_INSTALLED = True +except ImportError: + YUBIAUTH_INSTALLED = False YubiAuth = None AUTH_CONFIG_FILE = '/etc/yubico/auth/yubiauth.conf'