aboutsummaryrefslogtreecommitdiffstats
path: root/ulri
diff options
context:
space:
mode:
Diffstat (limited to 'ulri')
-rwxr-xr-xulri10
1 files changed, 2 insertions, 8 deletions
diff --git a/ulri b/ulri
index e29be95..dcd48a9 100755
--- a/ulri
+++ b/ulri
@@ -542,14 +542,8 @@ foreach my $prefix (sort keys %pkg_tree) {
# count noarch todos only once even if searching multiple bots
my $noarch_countflag = 0;
- my @arch_list = keys %{$config->{bot}};
- if (ref $config->{arch} eq 'ARRAY') {
- @arch_list = @{$config->{arch}};
- } elsif (ref $config->{arch}{$target} eq 'ARRAY') {
- @arch_list = @{$config->{arch}{$target}};
- } elsif (ref $config->{arch}{default} eq 'ARRAY') {
- @arch_list = @{$config->{arch}{default}};
- }
+ my $arch_list = find { ref($_) eq 'ARRAY' } $config->{arch}, $config->{arch}{$target}, $config->{arch}{default};
+ my @arch_list = $arch_list ? @$arch_list : keys %{$config->{bot}};
# need to find a bot for each arch
foreach my $arch (@arch_list) {