From 0193f2559a4a7c8940d0f28e2d8d98b3405f9f6b Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 8 Jun 2022 15:13:26 +0530 Subject: gn3: genodb: Do not terminate database strings with null. * gn3/genodb.py (GenotypeDatabase.get_metadata, GenotypeDatabase.matrix): Do not terminate database strings with the null character. --- gn3/genodb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gn3') diff --git a/gn3/genodb.py b/gn3/genodb.py index 71e9994..d8b906f 100644 --- a/gn3/genodb.py +++ b/gn3/genodb.py @@ -15,9 +15,9 @@ class GenotypeDatabase: def get(self, hash): return self.txn.get(hash) def get_metadata(self, hash, metadata): - return self.txn.get(hash + b':' + metadata.encode() + b'\0') + return self.txn.get(hash + b':' + metadata.encode()) def matrix(self): - hash = self.get(b'current\0') + hash = self.get(b'current') return Matrix(self, hash) class Matrix(): -- cgit v1.2.3