Skip to content

Commit

Permalink
YDA-5829: Unicode landing page comparison
Browse files Browse the repository at this point in the history
(Backport to Yoda 1.9)
  • Loading branch information
claravox authored and stsnel committed Dec 2, 2024
1 parent 53cf5dc commit e2ad071
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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
1 change: 0 additions & 1 deletion util/avu.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ def to_absolute(row, type):
data_objects_sub = itertools.imap(lambda x: to_absolute(x, "data_object"), data_objects_sub)

return itertools.chain(collection_root, data_objects_root, collection_sub, data_objects_sub)
>>>>>>> 076ca8f0 (YDA-5829: troubleshooting tool for published data packages)


def of_group(ctx, group):
Expand Down

0 comments on commit e2ad071

Please sign in to comment.