summaryrefslogtreecommitdiff
path: root/tests/test_pretty_print.py
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2013-03-09 15:42:53 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2013-03-09 15:42:53 (GMT)
commit74432b32069c99d056f0be1eaf9bd07eb67edba1 (patch)
treec0b7f505fa582d613cf2f86cc4f690b261db3953 /tests/test_pretty_print.py
parent2ab5a0cc9bae5c66b9050ba0d1e2f2f563091d17 (diff)
fix for when running under wine. also fix test_pretty_print bug
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