diff options
Diffstat (limited to 'lib/output.py')
| -rw-r--r-- | lib/output.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/output.py b/lib/output.py index d5c513e2..cf7895e8 100644 --- a/lib/output.py +++ b/lib/output.py @@ -1,6 +1,8 @@ +import sys import pyembroidery import simpletransform +from .i18n import _ from .utils import Point from .svg import PIXELS_PER_MM, get_doc_size, get_viewbox_transform from .commands import global_command @@ -84,4 +86,10 @@ def write_embroidery_file(file_path, stitch_plan, svg): "full_jump": True, } - pyembroidery.write(pattern, file_path, settings) + try: + pyembroidery.write(pattern, file_path, settings) + except IOError as e: + # L10N low-level file error. %(error)s is (hopefully?) translated by + # the user's system automatically. + print >> sys.stderr, _("Error writing to %(path)s: %(error)s") % dict(path=file_path, error=e.message) + sys.exit(1) |
