summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cloudinit/ec2_utils.py6
1 files changed, 2 insertions, 4 deletions
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',