1
0

do not raise BaseException

This commit is contained in:
SomberNight
2019-08-16 22:40:17 +02:00
committed by ThomasV
parent d955285808
commit e54f0fbafa
2 changed files with 4 additions and 3 deletions

View File

@@ -390,7 +390,7 @@ class Peer(Logger):
elif encoded[0] == 1:
decoded = zlib.decompress(encoded[1:])
else:
raise BaseException('zlib')
raise Exception(f'decode_short_ids: unexpected first byte: {encoded[0]}')
ids = [decoded[i:i+8] for i in range(0, len(decoded), 8)]
return ids