diff options
| author | Lex Neva <github.com@lexneva.name> | 2018-08-24 21:44:42 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2018-09-01 20:11:01 -0400 |
| commit | 29a8bd37d5f0d10ee3b306caeee9a9d46247b02e (patch) | |
| tree | 73b8312156335c5cd8b33dbd80671b719f613b81 /lib/output.py | |
| parent | 5c0e2b8e9fcba9f06b288e6dbf8d5183fb93d5d4 (diff) | |
useful error message when writing embroidery file fails (fixes #279)
Diffstat (limited to 'lib/output.py')
| -rw-r--r-- | lib/output.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/output.py b/lib/output.py index d5c513e2..1278c5b1 100644 --- a/lib/output.py +++ b/lib/output.py @@ -84,4 +84,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) |
