repo2json: Open the out file as binary to avoid any encoding question
Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
parent
89afed8844
commit
39179f6c00
1 changed files with 1 additions and 1 deletions
|
@ -162,7 +162,7 @@ def decompress_primary_db(archive, location):
|
|||
tar.extractall(path=location)
|
||||
elif archive.endswith('.bz2'):
|
||||
import bz2
|
||||
with open(location, 'w') as out:
|
||||
with open(location, 'wb') as out:
|
||||
bzar = bz2.BZ2File(archive)
|
||||
out.write(bzar.read())
|
||||
bzar.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue