-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
replace uses of sort_json_policy_dict with compare_policies #52943
Conversation
…compatible with Python 3 and remove sort_json_policy_dict from the AWS guidelines since it only works on Python 2
@s-hertel, just so you are aware we have a dedicated Working Group for aws. |
@@ -292,19 +292,15 @@ def run(ecr, params, verbosity): | |||
|
|||
elif policy_text is not None: | |||
try: | |||
policy = sort_json_policy_dict(policy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor thing, not a blocker: Since this line is gone, the returned policy is no longer sorted but only when verbosity > 2. I'm not sure how much that matters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, missed that! I added a commit to sort policy lists only containing string types so it works on python 3.
You are a scholar and a gentleperson. This works for me. |
SUMMARY
Use compare_policies since it is compatible with Python 3
remove sort_json_policy_dict from the AWS guidelines since it only works consistently on Python 2
Fixes #43029
ISSUE TYPE