mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-28 08:39:54 +02:00
show more info in merge conflict error message
This commit is contained in:
@@ -63,7 +63,7 @@ def merge_links(a: Link, b: Link) -> Link:
|
|||||||
"""deterministially merge two links, favoring longer field values over shorter,
|
"""deterministially merge two links, favoring longer field values over shorter,
|
||||||
and "cleaner" values over worse ones.
|
and "cleaner" values over worse ones.
|
||||||
"""
|
"""
|
||||||
assert a.base_url == b.base_url, 'Cannot merge two links with different URLs'
|
assert a.base_url == b.base_url, f'Cannot merge two links with different URLs ({a.base_url} != {b.base_url})'
|
||||||
|
|
||||||
# longest url wins (because a fuzzy url will always be shorter)
|
# longest url wins (because a fuzzy url will always be shorter)
|
||||||
url = a.url if len(a.url) > len(b.url) else b.url
|
url = a.url if len(a.url) > len(b.url) else b.url
|
||||||
|
Reference in New Issue
Block a user