aboutsummaryrefslogtreecommitdiff
path: root/gn3/genodb.py
diff options
context:
space:
mode:
authorArun Isaac2022-06-08 15:13:26 +0530
committerArun Isaac2022-06-08 15:13:26 +0530
commit0193f2559a4a7c8940d0f28e2d8d98b3405f9f6b (patch)
tree448e816caf845903dd5e348599d4c0b963152fff /gn3/genodb.py
parent89c099319a4f5730cfff7d26219a43eab7490b83 (diff)
downloadgenenetwork3-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.
Diffstat (limited to 'gn3/genodb.py')
-rw-r--r--gn3/genodb.py4
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():