Skip to content

Commit

Permalink
repozo: fix recover on stdout
Browse files Browse the repository at this point in the history
This was working on python2, but on python3,

  repozo -v --recover --repository backups/ > restored.fs

failed with

  TypeError: write() argument must be str, not bytes
  • Loading branch information
perrinjerome committed Oct 29, 2024
1 parent bcca663 commit 434dc8c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
6.0.1 (unreleased)
==================

- repozo: fix restoring on stdout.


6.0 (2024-03-20)
================
Expand Down
2 changes: 1 addition & 1 deletion src/ZODB/scripts/repozo.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ def do_recover(options):
files_to_close = ()
if options.output is None:
log('Recovering file to stdout')
outfp = sys.stdout
outfp = sys.stdout.buffer
else:
# Delete old ZODB before recovering backup as size of
# old ZODB + full partial file may be superior to free disk space
Expand Down

0 comments on commit 434dc8c

Please sign in to comment.