test_caless: adjust try/except to capture also IOError

While testing on RHEL we are getting IOError instead of OSError.
Add also IOError to except clause.

This is mostly for compatibility reasons however should not cause
any issue as IOError is alias for OSError on Python3.

https://pagure.io/freeipa/issue/7439

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
This commit is contained in:
Michal Reznik 2018-03-12 15:06:33 +01:00 committed by Christian Heimes
parent 105e774914
commit 5a04936f47

View File

@ -273,8 +273,9 @@ class CALessBase(IntegrationTest):
destination_host.transport.put_file(
os.path.join(self.cert_dir, filename),
os.path.join(destination_host.config.test_dir, filename))
except OSError:
except (IOError, OSError):
pass
extra_args = []
if http_pkcs12_exists:
extra_args.extend(['--http-cert-file', http_pkcs12])