mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
fix py3 version of calibredb show_metadata
This commit is contained in:
parent
48394ddc55
commit
2805161757
@ -49,8 +49,9 @@ def main(opts, args, dbctx):
|
|||||||
if mi is None:
|
if mi is None:
|
||||||
raise SystemExit('Id #%d is not present in database.' % id)
|
raise SystemExit('Id #%d is not present in database.' % id)
|
||||||
if opts.as_opf:
|
if opts.as_opf:
|
||||||
|
stdout = getattr(sys.stdout, 'buffer', sys.stdout)
|
||||||
mi = OPFCreator(getcwd(), mi)
|
mi = OPFCreator(getcwd(), mi)
|
||||||
mi.render(sys.stdout)
|
mi.render(stdout)
|
||||||
else:
|
else:
|
||||||
prints(unicode_type(mi))
|
prints(unicode_type(mi))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user