From ca90cc5c900204cec251f17964387472d8e32720 Mon Sep 17 00:00:00 2001 From: espie Date: Sun, 27 Jul 2014 22:17:33 +0000 Subject: [PATCH] ensure log stuff happens, even without context --- usr.sbin/pkg_add/OpenBSD/Log.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/pkg_add/OpenBSD/Log.pm b/usr.sbin/pkg_add/OpenBSD/Log.pm index 2b8d613ec4d..1610267d5f9 100644 --- a/usr.sbin/pkg_add/OpenBSD/Log.pm +++ b/usr.sbin/pkg_add/OpenBSD/Log.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Log.pm,v 1.8 2014/03/18 18:53:29 espie Exp $ +# $OpenBSD: Log.pm,v 1.9 2014/07/27 22:17:33 espie Exp $ # # Copyright (c) 2007-2010 Marc Espie # @@ -36,12 +36,14 @@ sub set_context sub messages { my $self = shift; + $self->{context} //= "???"; return $self->{messages}{$self->{context}} //= []; } sub errmessages { my $self = shift; + $self->{context} //= "???"; return $self->{errmessages}{$self->{context}} //= []; } -- 2.20.1