MCPcopy
hub / github.com/aws/aws-cli / _aws

Function _aws

tests/integration/test_smoke.py:33–45  ·  view source on GitHub ↗
(command_string, max_attempts=1, delay=5, target_rc=0)

Source from the content-addressed store, hash-verified

31
32
33def _aws(command_string, max_attempts=1, delay=5, target_rc=0):
34 service = command_string.split()[0]
35 env = None
36 if service in REGION_OVERRIDES:
37 env = os.environ.copy()
38 env['AWS_REGION'] = REGION_OVERRIDES[service]
39
40 for _ in range(max_attempts - 1):
41 result = aws(command_string, env_vars=env)
42 if result.rc == target_rc:
43 return result
44 time.sleep(delay)
45 return aws(command_string, env_vars=env)
46
47
48@pytest.mark.parametrize('cmd', COMMANDS)

Callers 3

awsFunction · 0.85

Calls 3

awsFunction · 0.90
copyMethod · 0.45
sleepMethod · 0.45

Tested by

no test coverage detected