From e344f7e478a112fc6aadde5907e90d48a46c5431 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Mon, 16 Jun 2014 15:56:07 -0400 Subject: [PATCH] Bugfix - png is the last arg + some better error output --- tests/export_import_pngtest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/export_import_pngtest.py b/tests/export_import_pngtest.py index e406de1c..5d57fdf5 100644 --- a/tests/export_import_pngtest.py +++ b/tests/export_import_pngtest.py @@ -33,8 +33,8 @@ args,remaining_args = parser.parse_known_args() args.format = args.format.lower() scadfile = remaining_args[0] -pngfile = remaining_args[1] -remaining_args = remaining_args[2:] +pngfile = remaining_args[-1] +remaining_args = remaining_args[1:-1] if not os.path.exists(scadfile): failquit('cant find .scad file named: ' + scadfile) @@ -56,7 +56,7 @@ print('Running OpenSCAD #1:') print(' '.join(export_cmd)) result = subprocess.call(export_cmd) if result != 0: - failquit('failure of 1st subprocess.call: ' + ' '.join(export_cmd)) + failquit('OpenSCAD #1 failed with return code ' + str(result)) # @@ -78,7 +78,7 @@ print('Running OpenSCAD #2:') print(' '.join(create_png_cmd)) result = subprocess.call(create_png_cmd) if result != 0: - failquit('failure of 2nd subprocess.call: ' + ' '.join(create_png_cmd)) + failquit('OpenSCAD #2 failed with return code ' + str(result)) try: os.remove(threedfilename) except: failquit('failure at os.remove('+threedfilename+')')