mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 03:40:42 -03:30
Validating the version of python-dateutil
This commit is contained in:
parent
cc037cb4b5
commit
a4ec6f6763
@ -10,7 +10,7 @@ DOCUMENTATION = """
|
||||
short_description: Generate an rrule string which can be used for Tower Schedules
|
||||
requirements:
|
||||
- pytz
|
||||
- python.dateutil
|
||||
- python.dateutil >= 2.8.1
|
||||
description:
|
||||
- Returns a string based on criteria which represent an rule
|
||||
options:
|
||||
@ -101,6 +101,13 @@ try:
|
||||
except ImportError:
|
||||
missing_modules.append('python.dateutil')
|
||||
|
||||
# Validate the version of python.dateutil
|
||||
try:
|
||||
import dateutil
|
||||
dateutil.__version__
|
||||
except Exception:
|
||||
missing_modules.append('python.dateutil>=2.8.1')
|
||||
|
||||
if len(missing_modules) > 0:
|
||||
raise AnsibleError('You are missing the modules {0}'.format(', '.join(missing_modules)))
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user