[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 02/02: T::L::Harness: Fail more gracefully if a template cannot be read



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit bc938084a5e390e2125ad2a39aecea2e4e464da6
Author: Niels Thykier <niels@thykier.net>
Date:   Sat Apr 9 09:50:12 2016 +0000

    T::L::Harness: Fail more gracefully if a template cannot be read
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 lib/Test/Lintian/Harness.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/Test/Lintian/Harness.pm b/lib/Test/Lintian/Harness.pm
index bd21927..e347cea 100644
--- a/lib/Test/Lintian/Harness.pm
+++ b/lib/Test/Lintian/Harness.pm
@@ -273,6 +273,8 @@ sub fill_in_tmpl {
     my $tmpl = "$file.in";
 
     my $template = Text::Template->new(TYPE => 'FILE',  SOURCE => $tmpl);
+    fail("Cannot read template $tmpl: $Text::Template::ERROR")
+      if not $template;
     open(my $out, '>', $file);
 
     unless ($template->fill_in(OUTPUT => $out, HASH => $data)) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: