URL: https://github.com/freeipa/freeipa/pull/1682 Author: tiran Title: #1682: [Backport][ipa-4-5] test_caless: adjust try/except to capture IOError Action: opened
PR body: """ This PR was opened automatically because PR #1669 was pushed to master and backport to ipa-4-5 is required. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/1682/head:pr1682 git checkout pr1682
From 9097a854cc8add423e891554205a4e37ae70ac51 Mon Sep 17 00:00:00 2001 From: Michal Reznik <mrez...@redhat.com> Date: Mon, 12 Mar 2018 15:06:33 +0100 Subject: [PATCH] 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 --- ipatests/test_integration/test_caless.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipatests/test_integration/test_caless.py b/ipatests/test_integration/test_caless.py index 10acbb696d..0a6c752621 100644 --- a/ipatests/test_integration/test_caless.py +++ b/ipatests/test_integration/test_caless.py @@ -270,8 +270,9 @@ def prepare_replica(self, _replica_number=0, replica=None, master=None, 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])
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org