aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2006-11-27 13:28:10 +0000
committerThierry Vignaud <tv@mandriva.org>2006-11-27 13:28:10 +0000
commitd7f12f12f90f155b5c3a73d1792633b85e095415 (patch)
tree7e96d1e0402fd9d0a6b6dcec5205e037381443c0
parente110cfbe6251bf90e3046ae4a9617ffe10dd2016 (diff)
downloadrpmdrake-d7f12f12f90f155b5c3a73d1792633b85e095415.tar
rpmdrake-d7f12f12f90f155b5c3a73d1792633b85e095415.tar.gz
rpmdrake-d7f12f12f90f155b5c3a73d1792633b85e095415.tar.bz2
rpmdrake-d7f12f12f90f155b5c3a73d1792633b85e095415.tar.xz
rpmdrake-d7f12f12f90f155b5c3a73d1792633b85e095415.zip
(get_info) defensive programming (#26099)
-rwxr-xr-xrpmdrake7
1 files changed, 6 insertions, 1 deletions
diff --git a/rpmdrake b/rpmdrake
index fb8fca0f..8e08d5f8 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -1106,7 +1106,12 @@ or you already installed all of them."));
exists $pkgs->{$key} or return [ [ N("Description not available for this package\n") ] ];
exists $pkgs->{$key}{description} && exists $pkgs->{$key}{files}
or slow_func($tree->window, sub { extract_header($pkgs->{$key}, $urpm) });
- format_pkg_simplifiedinfo($pkgs, $key, $urpm, $descriptions);
+ my $s;
+ eval { $s = format_pkg_simplifiedinfo($pkgs, $key, $urpm, $descriptions) };
+ if (my $err = $@) {
+ $s = N("A fatal error occurred: %s.", $err);
+ }
+ $s;
},
check_interactive_to_toggle => sub { 1 },
grep_allowed_to_toggle => sub { @_ },