0082ddf ipa console: catch proper exception when history file can not be open

1 file Authored by sorlov 4 years ago, Committed by cheimes 4 years ago,
    ipa console: catch proper exception when history file can not be open
    
    When history file could not be open we were catching OSError. This worked
    for python3, as it raises FileNotFoundError, which is a subclass of
    OSError. But in python2 IOError is raised when file does not exist and
    as this exception was not catched, "ipa conosle" command was crashing.
    As far as in pyton3 IOError and OSError have been merged
    (OSError is IOError) we can safely catch only IOError.
    
    Fixes: https://pagure.io/freeipa/issue/7922
    Reviewed-By: Christian Heimes <cheimes@redhat.com>
    
        
file modified
+2 -2