From eb39018d18c147a8354eb395eef25c43132157a5 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Fri, 19 Jun 2020 16:57:41 +0200 Subject: [PATCH] raise error if none of --size, --factor or --maxpages is given --- plakativ.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plakativ.py b/plakativ.py index b3608ba..889ac1c 100755 --- a/plakativ.py +++ b/plakativ.py @@ -2125,7 +2125,12 @@ Report bugs at https://gitlab.mister-muffin.de/josch/plakativ/issues elif isinstance(args.mode, int): mode = "npages" else: - raise Exception("logic error") + print( + "Error: must supply one of --size, --factor or --maxpages\n", + file=sys.stderr, + ) + parser.print_usage(sys.stderr) + sys.exit(1) compute_layout( args.input,