f4a2083 Fix ipa-restore (python2)

Authored and Committed by frenaud 6 years ago
    Fix ipa-restore (python2)
    
    In order to stop tracking LDAP server cert, ipa-restore is using
    dse.ldif to find the certificate name. But when ipa-server-install
    --uninstall has been called, the file does not exist, leading to a
    IOError exception (regression introduced by 87540fe).
    
    The ipa-restore code properly catches the exception in python3 because
    IOError is a subclass of OSError, but in python2 this is not the case.
    The fix catches IOError and OSError to work properly with both version.
    
    Fixes:
    https://pagure.io/freeipa/issue/7231
    
    Reviewed-By: Rob Crittenden <rcritten@redhat.com>