Skip to content
Snippets Groups Projects
Unverified Commit c3735cef authored by Ayub's avatar Ayub Committed by GitHub
Browse files

Merge pull request #21874 from edx/BOM-804

BOM-804
parents 4bce520f 44b2414a
No related branches found
No related tags found
No related merge requests found
......@@ -119,7 +119,7 @@ class ImportSystem(XMLParsingSystem, MakoDescriptorSystem):
orig_name = orig_name[len(tag) + 1:-12]
# append the hash of the content--the first 12 bytes should be plenty.
orig_name = "_" + orig_name if orig_name not in (None, "") else ""
xml_bytes = xml.encode('utf8')
xml_bytes = xml if isinstance(xml, bytes) else xml.encode('utf-8')
return tag + orig_name + "_" + hashlib.sha1(xml_bytes).hexdigest()[:12]
# Fallback if there was nothing we could use:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment