diff options
Diffstat (limited to 'support/dxf_export/__main__.py')
-rw-r--r-- | support/dxf_export/__main__.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/support/dxf_export/__main__.py b/support/dxf_export/__main__.py index 76c2121..c770a0e 100644 --- a/support/dxf_export/__main__.py +++ b/support/dxf_export/__main__.py @@ -1,14 +1,14 @@ import sys, os, xml.etree.ElementTree, shutil from lib import util -from . import better_dxf_outlines +from . import effect def _export_dxf(in_path, out_path): - dxf_export = better_dxf_outlines.MyEffect() + dxf_export = effect.DXFExportEffect() dxf_export.affect(args = [in_path], output = False) with open(out_path, 'w') as file: - file.write(dxf_export.dxf) + dxf_export.write(file) def _get_inkscape_layer_count(svg_path): @@ -76,4 +76,10 @@ def main(in_path, out_path): _export_dxf(temp_svg_path, out_path) -main(*sys.argv[1:]) +try: + main(*sys.argv[1:]) +except util.UserError as e: + print 'Error:', e + sys.exit(1) +except KeyboardInterrupt: + sys.exit(2) |