summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-02-21 18:32:25 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-02-21 18:32:25 +0000
commit6c80194744a98d6919b1fcbef0fd8f3199fc5600 (patch)
tree7ced7fd6634f54a0d009a948bd792f27e1b64232
parente0f2365a3df8abf5df620bc173d91f159c784ab7 (diff)
downloadurpmi-6c80194744a98d6919b1fcbef0fd8f3199fc5600.tar
urpmi-6c80194744a98d6919b1fcbef0fd8f3199fc5600.tar.gz
urpmi-6c80194744a98d6919b1fcbef0fd8f3199fc5600.tar.bz2
urpmi-6c80194744a98d6919b1fcbef0fd8f3199fc5600.tar.xz
urpmi-6c80194744a98d6919b1fcbef0fd8f3199fc5600.zip
It seems that the msg callback is never defined in urpmi-parallel. Protect
against run-time errors; will have to work out how progress reporting is supposed to work.
-rw-r--r--urpm.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index 878acd3c..20bbd462 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -68,7 +68,10 @@ sub new {
fatal => sub { printf STDERR "%s\n", $_[1]; exit($_[0]) },
error => sub { printf STDERR "%s\n", $_[0] },
log => sub { printf STDERR "%s\n", $_[0] },
- ui_msg => sub { $self->{log}($_[0]); $self->{ui} and $self->{ui}{msg}->($_[1]) },
+ ui_msg => sub {
+ $self->{log}($_[0]);
+ ref $self->{ui} && ref $self->{ui}{msg} and $self->{ui}{msg}->($_[1])s;
+ },
}, $class;
$self->set_nofatal(1);
$self;