From c68a66f74ef253e281e880cbd2a80dd2d9ae99e3 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Mon, 19 Aug 2024 19:41:43 -0700 Subject: [PATCH] add salt kwarg to abid generation funcs --- archivebox/abid_utils/abid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/archivebox/abid_utils/abid.py b/archivebox/abid_utils/abid.py index f6f9d153..66472f10 100644 --- a/archivebox/abid_utils/abid.py +++ b/archivebox/abid_utils/abid.py @@ -184,7 +184,7 @@ def abid_part_from_rand(rand: Union[str, UUID, None, int]) -> str: return str(rand)[-ABID_RAND_LEN:].upper() -def abid_from_values(prefix, ts, uri, subtype, rand) -> ABID: +def abid_from_values(prefix, ts, uri, subtype, rand, salt=DEFAULT_ABID_URI_SALT) -> ABID: """ Return a freshly derived ABID (assembled from attrs defined in ABIDModel.abid_*_src). """ @@ -192,7 +192,7 @@ def abid_from_values(prefix, ts, uri, subtype, rand) -> ABID: abid = ABID( prefix=abid_part_from_prefix(prefix), ts=abid_part_from_ts(ts), - uri=abid_part_from_uri(uri), + uri=abid_part_from_uri(uri, salt=salt), subtype=abid_part_from_subtype(subtype), rand=abid_part_from_rand(rand), )