From 880f1d18170b4847c22cbf59aaf5a801cb5001b4 Mon Sep 17 00:00:00 2001 From: Sloane Hertel Date: Wed, 11 Jul 2018 12:40:45 -0400 Subject: [PATCH] [s3_bucket] import urlparse (#42474) Fixes #42459 (cherry picked from commit 7086863c526e4870a76b22e34589842113c18086) --- lib/ansible/modules/cloud/amazon/s3_bucket.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/cloud/amazon/s3_bucket.py b/lib/ansible/modules/cloud/amazon/s3_bucket.py index 3facc177994..3effbfe7a26 100644 --- a/lib/ansible/modules/cloud/amazon/s3_bucket.py +++ b/lib/ansible/modules/cloud/amazon/s3_bucket.py @@ -108,7 +108,7 @@ import json import os import time -import ansible.module_utils.six.moves.urllib.parse as urlparse +from ansible.module_utils.six.moves.urllib.parse import urlparse from ansible.module_utils.six import string_types from ansible.module_utils.basic import to_text from ansible.module_utils.aws.core import AnsibleAWSModule @@ -455,7 +455,7 @@ def destroy_bucket(s3_client, module): def is_fakes3(s3_url): """ Return True if s3_url has scheme fakes3:// """ if s3_url is not None: - return urlparse.urlparse(s3_url).scheme in ('fakes3', 'fakes3s') + return urlparse(s3_url).scheme in ('fakes3', 'fakes3s') else: return False @@ -465,7 +465,7 @@ def is_walrus(s3_url): We assume anything other than *.amazonaws.com is Walrus""" if s3_url is not None: - o = urlparse.urlparse(s3_url) + o = urlparse(s3_url) return not o.hostname.endswith('amazonaws.com') else: return False