summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm.pm')
-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;