|
|
@ -125,6 +125,8 @@ import os
|
|
|
|
import urlparse
|
|
|
|
import urlparse
|
|
|
|
import hashlib
|
|
|
|
import hashlib
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from boto.s3.connection import OrdinaryCallingFormat
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
import boto
|
|
|
|
import boto
|
|
|
|
from boto.s3.connection import Location
|
|
|
|
from boto.s3.connection import Location
|
|
|
@ -321,7 +323,6 @@ def main():
|
|
|
|
if is_fakes3(s3_url):
|
|
|
|
if is_fakes3(s3_url):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
fakes3 = urlparse.urlparse(s3_url)
|
|
|
|
fakes3 = urlparse.urlparse(s3_url)
|
|
|
|
from boto.s3.connection import OrdinaryCallingFormat
|
|
|
|
|
|
|
|
s3 = boto.connect_s3(
|
|
|
|
s3 = boto.connect_s3(
|
|
|
|
aws_access_key,
|
|
|
|
aws_access_key,
|
|
|
|
aws_secret_key,
|
|
|
|
aws_secret_key,
|
|
|
@ -339,7 +340,6 @@ def main():
|
|
|
|
module.fail_json(msg = str(e))
|
|
|
|
module.fail_json(msg = str(e))
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
from boto.s3.connection import OrdinaryCallingFormat
|
|
|
|
|
|
|
|
s3 = boto.s3.connect_to_region(location, aws_access_key_id=aws_access_key, aws_secret_access_key=aws_secret_key, is_secure=True, calling_format=OrdinaryCallingFormat())
|
|
|
|
s3 = boto.s3.connect_to_region(location, aws_access_key_id=aws_access_key, aws_secret_access_key=aws_secret_key, is_secure=True, calling_format=OrdinaryCallingFormat())
|
|
|
|
except boto.exception.NoAuthHandlerFound, e:
|
|
|
|
except boto.exception.NoAuthHandlerFound, e:
|
|
|
|
module.fail_json(msg = str(e))
|
|
|
|
module.fail_json(msg = str(e))
|
|
|
|