diff options
author | don bright <hugh.m.bright@gmail.com> | 2013-03-09 15:58:54 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2013-03-09 15:58:54 (GMT) |
commit | a7ee238a51fbf0dc6b24b2cbfec0a3f82407175c (patch) | |
tree | b987b8dd12b324ba51696d4897b7c04d66b7d419 /tests/test_pretty_print.py | |
parent | 74432b32069c99d056f0be1eaf9bd07eb67edba1 (diff) |
clarify error message when no image is generated
Diffstat (limited to 'tests/test_pretty_print.py')
-rwxr-xr-x | tests/test_pretty_print.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_pretty_print.py b/tests/test_pretty_print.py index 8c13c62..3f4f1c9 100755 --- a/tests/test_pretty_print.py +++ b/tests/test_pretty_print.py @@ -319,10 +319,14 @@ def png_encode64( fname, width=250 ): data = '' data_uri = data.encode("base64").replace("\n","") tag = '<img' + tag += ' style="border:1px solid gray"' tag += ' src="data:image/png;base64,' tag += data_uri + '"' tag += ' width="'+str(width)+'"' - tag += ' alt="openscad_test_image"' + if data =='': + tag += ' alt="error: no image generated"' + else: + tag += ' alt="openscad_test_image"' tag += ' />\n' return tag |