mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-31 06:48:25 -04:00
show more info in merge conflict error message
This commit is contained in:
parent
718d39e242
commit
77d2f08a5c
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue