Skip to content

Commit

Permalink
repozo: fix recover on stdout (#405)
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 authored Oct 30, 2024
1 parent 98b3baa commit 783610f
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.

- repozo: prevent an incorrect "option ignored" warning when running backup or verify.


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 783610f

Please sign in to comment.