forked from LBRYCommunity/lbry-sdk
fix bytes vs str error in migrate5to6 script
This commit is contained in:
parent
9f9ec692c7
commit
1dbb250413
1 changed files with 5 additions and 1 deletions
|
@ -186,10 +186,14 @@ def do_migration(db_dir):
|
||||||
(stream_hash, blob_hash, position, iv)
|
(stream_hash, blob_hash, position, iv)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
download_dir = conf.settings.download_dir
|
||||||
|
if not isinstance(download_dir, bytes):
|
||||||
|
download_dir = download_dir.encode()
|
||||||
|
|
||||||
# insert the file
|
# insert the file
|
||||||
transaction.execute(
|
transaction.execute(
|
||||||
"insert or ignore into file values (?, ?, ?, ?, ?)",
|
"insert or ignore into file values (?, ?, ?, ?, ?)",
|
||||||
(stream_hash, stream_name, hexlify(conf.settings.download_dir),
|
(stream_hash, stream_name, hexlify(download_dir),
|
||||||
data_rate, status)
|
data_rate, status)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue