diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-05-29 19:29:40 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-05-29 19:29:40 -0400 |
commit | 9d93029f010c5eaa73ecbce8eb887d9132b7311a (patch) | |
tree | ea7be6d4d785ffa7ef26c1bcc404bff89a8138ad | |
parent | b0a7b2f3d7e62d35668a42dab2256505e68515f1 (diff) | |
download | ikiwiki-9d93029f010c5eaa73ecbce8eb887d9132b7311a.tar ikiwiki-9d93029f010c5eaa73ecbce8eb887d9132b7311a.tar.gz |
teximg: If the log isn't written, avoid ugly error messages.
-rw-r--r-- | IkiWiki/Plugin/teximg.pm | 11 | ||||
-rw-r--r-- | debian/changelog | 1 |
2 files changed, 7 insertions, 5 deletions
diff --git a/IkiWiki/Plugin/teximg.pm b/IkiWiki/Plugin/teximg.pm index 29c1057f3..8c3e88c69 100644 --- a/IkiWiki/Plugin/teximg.pm +++ b/IkiWiki/Plugin/teximg.pm @@ -119,12 +119,13 @@ sub gen_image ($$$$) { #{{{ } else { # store failure log - my $log; + my $log=""; { - open(my $f, '<', "$tmp/$digest.log"); - local $/=undef; - $log = <$f>; - close($f); + if (open(my $f, '<', "$tmp/$digest.log")) { + local $/=undef; + $log = <$f>; + close($f); + } } writefile("$digest.log", "$config{destdir}/$imagedir", $log); diff --git a/debian/changelog b/debian/changelog index 16c5fa65c..6012bc3bf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,7 @@ ikiwiki (2.48) UNRELEASED; urgency=low mailed. * The password_cost config setting is provided as a "more security" knob. * teximg: Fix logurl. + * teximg: If the log isn't written, avoid ugly error messages. -- Joey Hess <joeyh@debian.org> Wed, 28 May 2008 03:07:37 -0400 |