Fix missing allow_date=False.

pull/70087/head
Felix Fontein 5 years ago committed by Matt Clay
parent 9c92c96918
commit 80410f292b

@ -1492,7 +1492,7 @@ class ModuleValidator(Validator):
removed_at_date = data.get('removed_at_date', None) removed_at_date = data.get('removed_at_date', None)
if removed_at_date is not None: if removed_at_date is not None:
try: try:
if parse_isodate(removed_at_date) < datetime.date.today(): if parse_isodate(removed_at_date, allow_date=False) < datetime.date.today():
msg = "Argument '%s' in argument_spec" % arg msg = "Argument '%s' in argument_spec" % arg
if context: if context:
msg += " found in %s" % " -> ".join(context) msg += " found in %s" % " -> ".join(context)
@ -1513,7 +1513,7 @@ class ModuleValidator(Validator):
if 'name' in deprecated_alias and 'date' in deprecated_alias: if 'name' in deprecated_alias and 'date' in deprecated_alias:
try: try:
date = deprecated_alias['date'] date = deprecated_alias['date']
if parse_isodate(date) < datetime.date.today(): if parse_isodate(date, allow_date=False) < datetime.date.today():
msg = "Argument '%s' in argument_spec" % arg msg = "Argument '%s' in argument_spec" % arg
if context: if context:
msg += " found in %s" % " -> ".join(context) msg += " found in %s" % " -> ".join(context)

Loading…
Cancel
Save