database: make py3-compatible
This commit is contained in:
parent
cbc40697f7
commit
bdb8b395b5
|
@ -6,7 +6,8 @@ class DBError(Exception):
|
|||
pass
|
||||
|
||||
def get_schema(version):
|
||||
return resource_string("wormhole", "db-schemas/v%d.sql" % version)
|
||||
schema_bytes = resource_string("wormhole", "db-schemas/v%d.sql" % version)
|
||||
return schema_bytes.decode("utf-8")
|
||||
|
||||
def get_db(dbfile, stderr=sys.stderr):
|
||||
"""Open or create the given db file. The parent directory must exist.
|
||||
|
|
Loading…
Reference in New Issue
Block a user