From 4a2233c5f732f3c02428917d2b7077899f47597b Mon Sep 17 00:00:00 2001 From: Antoine Pietri <antoine.pietri1@gmail.com> Date: Mon, 23 Mar 2020 19:09:47 +0100 Subject: [PATCH] identifiers: encode origin URLs in utf-8 --- swh/model/identifiers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swh/model/identifiers.py b/swh/model/identifiers.py index 85fc76c4..6ccf9488 100644 --- a/swh/model/identifiers.py +++ b/swh/model/identifiers.py @@ -612,7 +612,7 @@ def origin_identifier(origin): An origin's identifier is the sha1 checksum of the entire origin URL """ - return hashlib.sha1(origin['url'].encode('ascii')).hexdigest() + return hashlib.sha1(origin['url'].encode('utf-8')).hexdigest() _object_type_map = { -- GitLab