forked from LBRYCommunity/lbry-sdk
fix test_nulls
This commit is contained in:
parent
0a2c161ace
commit
24386c74f4
1 changed files with 2 additions and 1 deletions
|
@ -17,7 +17,8 @@ FILES = [
|
|||
def make_short_url(r):
|
||||
try:
|
||||
# fixme: we describe it as normalized but the old SDK didnt do that
|
||||
return f'{r["name"].decode()}#{r["shortestID"] or r["claimID"][::-1].hex()[0]}'
|
||||
name = r["name"].decode().replace("\x00", "")
|
||||
return f'{name}#{r["shortestID"] or r["claimID"][::-1].hex()[0]}'
|
||||
except UnicodeDecodeError:
|
||||
# print(f'failed making short url due to name parse error for claim_id: {r["claimID"][::-1].hex()}')
|
||||
return "INVALID NAME"
|
||||
|
|
Loading…
Reference in a new issue