fix py3 version of calibredb show_metadata

This commit is contained in:
Norbert Preining 2020-02-17 05:28:02 +09:00
parent 48394ddc55
commit 2805161757

View File

@ -49,8 +49,9 @@ def main(opts, args, dbctx):
if mi is None:
raise SystemExit('Id #%d is not present in database.' % id)
if opts.as_opf:
stdout = getattr(sys.stdout, 'buffer', sys.stdout)
mi = OPFCreator(getcwd(), mi)
mi.render(sys.stdout)
mi.render(stdout)
else:
prints(unicode_type(mi))