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>