ipatests: tasks.py: fix ipa-epn invocation

tasks.py::ipa_epn would previously fail to invoke ipa-epn with
from_nbdays=0.

Related: https://pagure.io/freeipa/issue/8449
Signed-off-by: François Cami <fcami@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
François Cami 2020-08-04 11:05:31 +02:00 committed by Florence Blanc-Renaud
parent 2d87cd4ae1
commit e1750e2a18

View File

@ -1470,9 +1470,9 @@ def ipa_epn(
cmd.append("--dry-run")
if mailtest:
cmd.append("--mail-test")
if from_nbdays:
if from_nbdays is not None:
cmd.extend(("--from-nbdays", str(from_nbdays)))
if to_nbdays:
if to_nbdays is not None:
cmd.extend(("--to-nbdays", str(to_nbdays)))
return host.run_command(cmd, raiseonerr=raiseonerr)