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")