From 10f341442617a0619c70c995c30d5d3632765c0e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 12 Aug 2020 06:16:57 +0530 Subject: [PATCH] ... --- src/calibre/prints.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/prints.py b/src/calibre/prints.py index 26f69eb821..0b737aff32 100644 --- a/src/calibre/prints.py +++ b/src/calibre/prints.py @@ -18,6 +18,8 @@ def is_binary(stream): def prints(*a, **kw): ' Print either unicode or bytes to either binary or text mode streams ' stream = kw.get('file', sys.stdout) + if stream is None: + return sep, end = kw.get('sep'), kw.get('end') if sep is None: sep = ' '