summaryrefslogtreecommitdiff
path: root/tests/test_pretty_print.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_pretty_print.py')
-rwxr-xr-xtests/test_pretty_print.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_pretty_print.py b/tests/test_pretty_print.py
index 54b0f92..8c13c62 100755
--- a/tests/test_pretty_print.py
+++ b/tests/test_pretty_print.py
@@ -312,8 +312,11 @@ TESTLOG
def png_encode64( fname, width=250 ):
# en.wikipedia.org/wiki/Data_URI_scheme
- f = open( fname, "rb" )
- data = f.read()
+ try:
+ f = open( fname, "rb" )
+ data = f.read()
+ except:
+ data = ''
data_uri = data.encode("base64").replace("\n","")
tag = '<img'
tag += ' src="data:image/png;base64,'
contact: Jan Huwald // Impressum