diff options
author | Arun Isaac | 2022-06-08 15:13:26 +0530 |
---|---|---|
committer | Arun Isaac | 2022-06-08 15:13:26 +0530 |
commit | 0193f2559a4a7c8940d0f28e2d8d98b3405f9f6b (patch) | |
tree | 448e816caf845903dd5e348599d4c0b963152fff | |
parent | 89c099319a4f5730cfff7d26219a43eab7490b83 (diff) | |
download | genenetwork3-0193f2559a4a7c8940d0f28e2d8d98b3405f9f6b.tar.gz |
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.
-rw-r--r-- | gn3/genodb.py | 4 |
1 files changed, 2 insertions, 2 deletions
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(): |