Skip to content

Commit

Permalink
YDA-5829: Unicode landing page comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
claravox authored and stsnel committed Dec 2, 2024
1 parent f251f69 commit 6e0c6aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion publication_troubleshoot.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,11 @@ def compare_local_remote_landingpage(ctx, file_path, url, offline, api_call):
return False

# Set encoding to utf-8 for the response text (otherwise will not match local_data)
# response.text is then returned as unicode
response.encoding = 'utf-8'
local_data_uni = local_data.decode("utf-8")

if local_data == response.text:
if local_data_uni == response.text:
return True

log.write(ctx, "compare_local_remote_landingpage: File contents at irods path <{}> and remote landing page <{}> do not match.".format(file_path, url), write_stdout)
Expand Down

0 comments on commit 6e0c6aa

Please sign in to comment.