8173e5d ipa-epn: don't use too general exception

1 file Authored by abbra 11 months ago, Committed by frenaud 11 months ago,
    ipa-epn: don't use too general exception
    
    When modifying ipa-epn code, a warning was issued:
    
    --------------
    Python 3.11.4 (main, Jun  7 2023, 00:00:00) [GCC 13.1.1 20230511 (Red Hat 13.1.1-2)]
    ************* Module ipaclient.install.ipa_epn
    ipaclient/install/ipa_epn.py:89: [W0719(broad-exception-raised), drop_privileges] Raising too general exception: Exception)
    --------------
    
    Use 'RequiresRoot' exception class and clarify the message:
        ipalib.errors.RequiresRoot: Cannot drop privileges!
    
    Related: https://pagure.io/freeipa/issue/9425
    
    Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
    Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
    
        
file modified
+1 -1