summaryrefslogtreecommitdiff
path: root/readyaml.py
diff options
context:
space:
mode:
Diffstat (limited to 'readyaml.py')
-rwxr-xr-xreadyaml.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/readyaml.py b/readyaml.py
index e2f3bb3..1a7206d 100755
--- a/readyaml.py
+++ b/readyaml.py
@@ -2,6 +2,7 @@
"""This tool reads a yaml file as generated by importpkg.py on stdin and
updates the database with the contents."""
+import binascii
import sqlite3
import sys
@@ -39,7 +40,7 @@ def readyaml(db, stream):
(package, entry["name"], entry["size"]))
cid = cur.lastrowid
cur.executemany("INSERT INTO hash (cid, function, hash) VALUES (?, ?, ?);",
- ((cid, func, hexhash)
+ ((cid, func, buffer(binascii.a2b_hex(hexhash)))
for func, hexhash in entry["hashes"].items()))
raise ValueError("missing commit block")