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
Python3: make newly introduced python file Python3 compatible #26112
Conversation
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.
LGTM % nits
subresource_path = "/" + os.path.relpath(__file__, base_path).replace('\\','/') | ||
subresource_params = "?partition_id=" + partition_id + "&uuid=" + uuid + "&subresource_origin=" + subresource_origin + "&include_credentials=" + include_credentials | ||
body = body.replace("SUBRESOURCE_PREFIX:", subresource_origin + subresource_path + subresource_params) | ||
subresource_path = u"/" + os.path.relpath(isomorphic_decode(__file__), base_path).replace(u'\\', u'/') |
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.
Nit: it's better to make subresource_path
binary in the first place, as all subsequent uses (along with subresource_params
) are all binary.
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.
Code updated. Thank you!
server_state = stash.take(uuid) or {u"test_failed": False} | ||
if address_key in server_state and server_state[address_key] != isomorphic_decode(partition_id): | ||
server_state[u"test_failed"] = True | ||
server_state[address_key] = isomorphic_decode(partition_id) |
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.
Nit: can we directly store and compare the binary partition_id
?
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.
Yes. Code updated.
@Hexcles, are the updated changes okay? Thank you! |
No description provided.