aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/MGA/Advisories.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm
index 9b29342..cbabd68 100644
--- a/lib/MGA/Advisories.pm
+++ b/lib/MGA/Advisories.pm
@@ -170,7 +170,15 @@ sub login_bz {
sub get_advisories_from_dir {
my %advisories;
foreach my $advfile (glob "$config->{advisories_dir}/*.adv") {
- my $adv = LoadFile($advfile);
+ my $adv;
+ eval {
+ $adv = LoadFile($advfile);
+ };
+ if ($@) {
+ print "Failed to load $advfile\n";
+ print $@;
+ next;
+ }
if (!$adv->{ID}) {
next unless $config->{mode} eq 'qa';
$adv->{ref} = basename($advfile, ".adv");