From 8d2ae0f64e691475b639f45f0dff55375e5bb616 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Tue, 13 Apr 2021 08:12:33 +0200 Subject: [PATCH] fix reading from stdin --- src/img2pdf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/img2pdf.py b/src/img2pdf.py index 5588838..624f967 100755 --- a/src/img2pdf.py +++ b/src/img2pdf.py @@ -2327,7 +2327,7 @@ def parse_borderarg(string): def input_images(path_expr): if path_expr == "-": # we slurp in all data from stdin because we need to seek in it later - result = sys.stdin.buffer.read() + result = [sys.stdin.buffer.read()] if len(result) == 0: raise argparse.ArgumentTypeError('"%s" is empty' % path_expr) else: @@ -3675,7 +3675,7 @@ and left/right, respectively. It is not possible to specify asymmetric borders. if len(args.images) == 0: logger.info("reading image from standard input") try: - args.images = [sys.stdin.buffer.read()] + args.images = [[sys.stdin.buffer.read()]] except KeyboardInterrupt: sys.exit(0)