diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-06-17 14:31:41 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-06-17 14:31:41 +0000 |
commit | adb46fcb63bced2025c302d4ee4b44be8b23c592 (patch) | |
tree | b97c3bd65f6d674c09513982dc4a0fb3ea4d925d /lib | |
parent | 196dd77df000d216f408df22861fe3c3c93e0cac (diff) | |
download | mgaadvisories-adb46fcb63bced2025c302d4ee4b44be8b23c592.tar mgaadvisories-adb46fcb63bced2025c302d4ee4b44be8b23c592.tar.gz mgaadvisories-adb46fcb63bced2025c302d4ee4b44be8b23c592.tar.bz2 mgaadvisories-adb46fcb63bced2025c302d4ee4b44be8b23c592.tar.xz mgaadvisories-adb46fcb63bced2025c302d4ee4b44be8b23c592.zip |
get_advisories_from_dir(): Check advisory type
Diffstat (limited to 'lib')
-rw-r--r-- | lib/MGA/Advisories.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/MGA/Advisories.pm b/lib/MGA/Advisories.pm index 8c8bab2..fed9caa 100644 --- a/lib/MGA/Advisories.pm +++ b/lib/MGA/Advisories.pm @@ -60,6 +60,8 @@ sub get_advisories_from_dir { my $adv = LoadFile($advfile); next unless $adv->{ID}; report_exit("Duplicate advisory $adv->{ID}") if $advisories{$adv->{ID}}; + report_exit("Unknown type $adv->{type}") unless + $config->{advisory_types}{$adv->{type}}; $advisories{$adv->{ID}} = $adv; my $statusfile = status_file($adv->{ID}); $adv->{status} = -f $statusfile ? LoadFile($statusfile) : {}; |