From 19bfd81a9b711b092dfc20a3a05c103b977ffebf Mon Sep 17 00:00:00 2001 From: Michiel Nauta Date: Fri, 10 Jun 2011 17:07:10 +0000 Subject: [PATCH] 4316: [NarWeb] Missing document.png svn: r17744 --- src/ThumbNails.py | 3 +-- src/plugins/webreport/NarrativeWeb.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ThumbNails.py b/src/ThumbNails.py index d2239d2b6..b460c19f3 100644 --- a/src/ThumbNails.py +++ b/src/ThumbNails.py @@ -252,8 +252,7 @@ def run_thumbnailer(mime_type, src_file, dest_file, size=const.THUMBSCALE): '%o' : dest_file, } cmdlist = [ sublist.get(x, x) for x in cmd.split() ] - os.spawnvpe(os.P_WAIT, cmdlist[0], cmdlist, os.environ) - return True + return os.spawnvpe(os.P_WAIT, cmdlist[0], cmdlist, os.environ) == 0 return False #------------------------------------------------------------------------- diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index 5dbbf0bf5..c8f15f0a7 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -2943,7 +2943,7 @@ class MediaPage(BasePage): self.report.copy_file(thmb_path, npath) path = npath os.unlink(thmb_path) - except IOError: + except EnvironmentError: path = os.path.join("images", "document.png") else: path = os.path.join("images", "document.png")