From 10065b1e5f0867978bb10472f609aa9238311367 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Fri, 23 Mar 2018 12:54:10 -0600 Subject: ec2: Adjust ec2 datasource after exception_cb change. The recent change to exception_cb missed this caller. The result was a slow test. --- cloudinit/ec2_utils.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'cloudinit') diff --git a/cloudinit/ec2_utils.py b/cloudinit/ec2_utils.py index d6c61e4c..dc3f0fc3 100644 --- a/cloudinit/ec2_utils.py +++ b/cloudinit/ec2_utils.py @@ -135,10 +135,8 @@ class MetadataMaterializer(object): def _skip_retry_on_codes(status_codes, _request_args, cause): - """Returns if a request should retry based on a given set of codes that - case retrying to be stopped/skipped. - """ - return cause.code in status_codes + """Returns False if cause.code is in status_codes.""" + return cause.code not in status_codes def get_instance_userdata(api_version='latest', -- cgit v1.2.3