aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2006-11-27 13:28:24 +0000
committerThierry Vignaud <tv@mandriva.org>2006-11-27 13:28:24 +0000
commit3b9b9b84cb63eda9503c1ccf4226dab742ea654c (patch)
treef6c44c37f2629aa342cf37c5fd854270d22603f1
parent8da2823381272fd50a8593a8d8fe97ff5700a694 (diff)
downloadrpmdrake-3b9b9b84cb63eda9503c1ccf4226dab742ea654c.tar
rpmdrake-3b9b9b84cb63eda9503c1ccf4226dab742ea654c.tar.gz
rpmdrake-3b9b9b84cb63eda9503c1ccf4226dab742ea654c.tar.bz2
rpmdrake-3b9b9b84cb63eda9503c1ccf4226dab742ea654c.tar.xz
rpmdrake-3b9b9b84cb63eda9503c1ccf4226dab742ea654c.zip
(get_info) defensive programming (#26099)
-rwxr-xr-xrpmdrake7
1 files changed, 6 insertions, 1 deletions
diff --git a/rpmdrake b/rpmdrake
index 21f7bdb1..655d5072 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 { @_ },