зеркало из https://github.com/mozilla/MozDef.git
Merge pull request #890 from gene1wood/fix-connect_sqs-mismatch-with-esworker_cloudtrail
Change connect_sqs parameter names to match boto
This commit is contained in:
Коммит
e00a84a86c
|
@ -3,8 +3,8 @@ import boto
|
||||||
import boto.utils
|
import boto.utils
|
||||||
|
|
||||||
|
|
||||||
def connect_sqs(region=None, access_key=None, secret_key=None,
|
def connect_sqs(region=None, aws_access_key_id=None,
|
||||||
task_exchange=None):
|
aws_secret_access_key=None, task_exchange=None):
|
||||||
if region is None:
|
if region is None:
|
||||||
try:
|
try:
|
||||||
# connect_sqs defaults to us-east-1 instead of the local region
|
# connect_sqs defaults to us-east-1 instead of the local region
|
||||||
|
@ -16,10 +16,10 @@ def connect_sqs(region=None, access_key=None, secret_key=None,
|
||||||
"MozDef isn't running in AWS")
|
"MozDef isn't running in AWS")
|
||||||
|
|
||||||
credentials = {}
|
credentials = {}
|
||||||
if access_key is not None:
|
if aws_access_key_id is not None:
|
||||||
credentials['aws_access_key_id'] = access_key
|
credentials['aws_access_key_id'] = aws_access_key_id
|
||||||
if secret_key is not None:
|
if aws_secret_access_key is not None:
|
||||||
credentials['aws_secret_access_key'] = secret_key
|
credentials['aws_secret_access_key'] = aws_secret_access_key
|
||||||
conn = sqs.connect_to_region(
|
conn = sqs.connect_to_region(
|
||||||
region_name=region,
|
region_name=region,
|
||||||
**credentials
|
**credentials
|
||||||
|
|
Загрузка…
Ссылка в новой задаче