From: Don Armstrong Date: Sun, 26 Oct 2008 18:13:28 +0000 (-0700) Subject: * Handle undefined bugs in the data which is read X-Git-Tag: release/2.6.0~467^2~24 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7c26d8b9218e2c30e94a2375e93ec44e211f1237;p=debbugs.git * Handle undefined bugs in the data which is read --- diff --git a/Debbugs/Control.pm b/Debbugs/Control.pm index 7cb645e..bedc7d8 100644 --- a/Debbugs/Control.pm +++ b/Debbugs/Control.pm @@ -826,7 +826,7 @@ sub bug_unarchive { die "No bug found for $param{bug}"; } print {$debug} "$param{bug} read done\n"; - my @bugs = map {$_->{bug_num}} @data; + my @bugs = map {(defined $_ and exists $_->{bug_num} and defined $_->{bug_num})?$_->{bug_num}:()} @data; print {$debug} "$param{bug} bugs ".join(' ',@bugs)."\n"; print {$debug} "$param{bug} unarchiving\n"; my @files_to_remove; @@ -974,6 +974,7 @@ sub __handle_affected_packages{ allow_extra => 1, ); for my $data (make_list($param{data})) { + next unless exists $data->{package} and defined $data->{package}; $param{affected_packages}{$data->{package}} = 1; } }