Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d1897ab

Browse files
committed
bumping version
refactoring assume role function
1 parent 677b501 commit d1897ab

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

‎README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ make web
143143

144144
## Change Log
145145

146+
* v0.2.11: Refactored the AWS assume role function
146147
* v0.2.10: Added AWS assume role functionality.
147148
* v0.2.9: Kinesis error response formatting
148149
* v0.2.7: Throw Kinesis errors randomly

‎localstack/utils/aws/aws_stack.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -431,14 +431,10 @@ def assume_role(role_arn, update_global_session=True):
431431

432432
# Using a timer to loop through the assume role function forever......
433433
def loop_assume_role(role_arn, timeout=DEFAULT_TIMER_LOOP_SECONDS):
434+
# Do an initial assume role
435+
assume_role(role_arn, True)
434436

435-
def do_assume_role():
436-
# this will do it once (we ignore the return value as we default to update_global_session=True)
437-
assume_role(role_arn, True)
438-
439-
# we call it again after it completes
440-
loop_assume_role(role_arn, timeout)
441-
442-
t = Timer(timeout, do_assume_role)
437+
# Create timer to loop through function
438+
t = Timer(timeout, loop_assume_role, args=[role_arn, timeout])
443439
t.daemon = True
444440
t.start()

‎setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def run(self):
7676

7777
setup(
7878
name='localstack',
79-
version='0.2.10',
79+
version='0.2.11',
8080
description='Provides an easy-to-use test/mocking framework for developing Cloud applications',
8181
author='Waldemar Hummer (Atlassian)',
8282
author_email='[email protected]',

0 commit comments

Comments
 (0)