s3_sync: fix broken import (#31460)

pull/31660/head
Pilou 7 years ago committed by René Moser
parent 83dec70ad8
commit 840a57a4ed

@ -99,6 +99,7 @@ options:
requirements:
- boto3 >= 1.4.4
- botocore
- python-dateutil
author: tedder
extends_documentation_fragment:
@ -209,13 +210,18 @@ import mimetypes
import os
import stat as osstat # os.stat constants
import traceback
from dateutil import tz
# import module snippets
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.ec2 import camel_dict_to_snake_dict, ec2_argument_spec, boto3_conn, get_aws_connection_info, HAS_BOTO3, boto_exception
from ansible.module_utils._text import to_text
try:
from dateutil import tz
HAS_DATEUTIL = True
except ImportError:
HAS_DATEUTIL = False
try:
import botocore
except ImportError:
@ -497,6 +503,10 @@ def main():
module = AnsibleModule(
argument_spec=argument_spec,
)
if not HAS_DATEUTIL:
module.fail_json(msg='dateutil required for this module')
if not HAS_BOTO3:
module.fail_json(msg='boto3 required for this module')

@ -1,6 +1,5 @@
lib/ansible/modules/cloud/amazon/cloudtrail.py
lib/ansible/modules/cloud/amazon/ec2_win_password.py
lib/ansible/modules/cloud/amazon/s3_sync.py
lib/ansible/modules/cloud/azure/azure.py
lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset.py
lib/ansible/modules/cloud/centurylink/clc_firewall_policy.py

Loading…
Cancel
Save