From c8d354a2fc663d49478b1b87329b0e6f11616704 Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 22 Dec 2018 22:12:23 -0500 Subject: print error message correctly --- lib/output.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/output.py b/lib/output.py index 5fa7791f..2745de1d 100644 --- a/lib/output.py +++ b/lib/output.py @@ -1,11 +1,12 @@ -import sys import pyembroidery +import sys + import simpletransform +from .commands import global_command from .i18n import _ -from .utils import Point from .svg import PIXELS_PER_MM, get_doc_size, get_viewbox_transform -from .commands import global_command +from .utils import Point def get_command(stitch): @@ -99,5 +100,5 @@ def write_embroidery_file(file_path, stitch_plan, svg, 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) + print >> sys.stderr, _("Error writing to %(path)s: %(error)s") % dict(path=file_path, error=e.strerror) sys.exit(1) -- cgit v1.2.3