From 082f999ac80a235d8256e928971aeaffe3cee40b Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Thu, 23 Apr 2020 07:47:39 +0200 Subject: [PATCH] =?UTF-8?q?fix=20with=5Fpdfrw=20assignment=20--=20thanks?= =?UTF-8?q?=20Micha=C5=82=20G=C3=B3rny?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/img2pdf.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/img2pdf.py b/src/img2pdf.py index 0882c17..68deed7 100755 --- a/src/img2pdf.py +++ b/src/img2pdf.py @@ -2450,7 +2450,8 @@ def gui(): ) global with_pdfrw - with_pdfrw = (not args["without_pdfrw"].get(),) + if with_pdfrw: + with_pdfrw = not args["without_pdfrw"].get() convert( *infiles, title=args["title"].get() if args["title"].get() else None, @@ -2589,6 +2590,7 @@ def gui(): variable=args["nodate"], state=tkinter.DISABLED, ).grid(row=1, column=0, columnspan=2, sticky=tkinter.W) + # TODO: only have this checkbox enabled if pdfrw is installed tkinter.Checkbutton( output_options, text="without pdfrw", @@ -3432,7 +3434,8 @@ and left/right, respectively. It is not possible to specify asymmetric borders. exit(2) global with_pdfrw - with_pdfrw = (not args.without_pdfrw,) + if with_pdfrw: + with_pdfrw = not args.without_pdfrw try: convert( *args.images,