3064b89 Conditionally import pyhbac

3 files Authored by cheimes 7 years ago, Committed by mbasti 7 years ago,
    Conditionally import pyhbac
    
    The pyhbac module is part of SSSD. It's not available as stand-alone
    PyPI package. It would take a lot of effort to package it because the
    code is deeply tight into SSSD.
    
    Let's follow the example of other SSSD Python packages and make the
    import of pyhbac conditionally. It's only necessary for caacl and
    hbactest plugins.
    
    I renamed convert_to_ipa_rule() to _convert_to_ipa_rule() because it
    does not check for presence of pyhbac package itself. The check is
    performed earlier in execute(). The prefix indicates that it is an
    internal function and developers have to think twice before using it
    in another place.
    
    This makes it much easier to install ipaserver with instrumented build
    of Python with a different ABI or in isolated virtual envs to profile
    and debug the server.
    
    Signed-off-by: Christian Heimes <cheimes@redhat.com>
    Reviewed-By: Martin Basti <mbasti@redhat.com>
    Reviewed-By: Jan Cholasta <jcholast@redhat.com>
    
        
file modified
+0 -86
file modified
+89 -1
file modified
+16 -3