diff -Nru lola-1.5/debian/changelog lola-1.6/debian/changelog --- lola-1.5/debian/changelog 2021-09-17 00:05:14.000000000 +0000 +++ lola-1.6/debian/changelog 2021-11-05 17:50:52.000000000 +0000 @@ -1,3 +1,10 @@ +lola (1.6-1) unstable; urgency=medium + + * New upstream version + * Don't create output file if there is an error + + -- Keith Packard Fri, 05 Nov 2021 10:50:52 -0700 + lola (1.5-1) unstable; urgency=medium * New upstream version diff -Nru lola-1.5/debian/control lola-1.6/debian/control --- lola-1.5/debian/control 2021-09-17 00:05:14.000000000 +0000 +++ lola-1.6/debian/control 2021-11-05 17:50:52.000000000 +0000 @@ -5,7 +5,7 @@ Homepage: https://keithp.com Build-Depends: debhelper-compat (= 13), python3 Rules-Requires-Root: no -Standards-Version: 4.5.1 +Standards-Version: 4.6.0.1 Package: lola Architecture: all diff -Nru lola-1.5/lola.py lola-1.6/lola.py --- lola-1.5/lola.py 2021-09-16 23:55:17.000000000 +0000 +++ lola-1.6/lola.py 2021-11-05 17:47:21.000000000 +0000 @@ -1366,9 +1366,6 @@ lex_file_name = args.input output = sys.stdout outputname = "" - if args.output: - outputname = args.output - output = open(args.output, 'w') format = 'c' if not args.format or args.format == 'c': format='c' @@ -1378,6 +1375,9 @@ error("Invalid output format %r" % args.format) grammar = lola() parse_table = ll(grammar) + if args.output: + outputname = args.output + output = open(args.output, 'w') if format == 'c': dump_c(grammar, parse_table, file=output, filename=outputname) elif format == 'python':