[Freeipa-devel] [TESTS][PATCH 0012] Provide cleanup for host certificate
Martin Basti
mbasti at redhat.com
Tue May 3 08:33:17 UTC 2016
Hello I'm quite confused what is happening in that code, can you explain
it more to me? I see duplicated code there.
On 03.05.2016 09:33, Lenka Doudova wrote:
> + def make_fixture_certcleanup(self, request):
> + """ Fixture to cleanup certificate from local host """
> + cleanup_command = self.make_update_command(
> + updates={'usercertificate':''})
> + try:
> + cleanup_command()
> + except errors.EmptyModlist:
> + pass
> +
Why it is called here.
> + def cleanup():
> + try:
> + cleanup_command()
> + except errors.EmptyModlist:
> + pass
> +
> + request.addfinalizer(cleanup)
Why it is the duplicated code called as finalizer when it was called before?
> +
> + return self
Martin^2
More information about the Freeipa-devel
mailing list