Fix incorrect deserialization of FdbClientLogEvents::Event (#7707)

We're trying to interpret an Optional<TenantName> here, but the
python truthiness of self.get_bytes(1) is _always_ true, since it's
non-empty. We need to look at the _contents_ of that byte instead.
This commit is contained in:
Andrew Noyes 2022-07-26 13:10:31 -07:00 committed by GitHub
parent 698360daf0
commit de331ba080
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -194,7 +194,7 @@ class BaseInfo(object):
if protocol_version >= PROTOCOL_VERSION_6_3:
self.dc_id = bb.get_bytes_with_length()
if protocol_version >= PROTOCOL_VERSION_7_1:
if bb.get_bytes(1):
if bb.get_bool():
self.tenant = bb.get_bytes_with_length()
class GetVersionInfo(BaseInfo):