Skip to content

Commit

Permalink
[s3_bucket] import urlparse (ansible#42474)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-hertel authored and ryansb committed Jul 11, 2018
1 parent ccbac66 commit 7086863
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ansible/modules/cloud/amazon/s3_bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
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
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 7086863

Please sign in to comment.