From: espie Date: Sun, 27 Jul 2014 22:17:33 +0000 (+0000) Subject: ensure log stuff happens, even without context X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ca90cc5c900204cec251f17964387472d8e32720;p=openbsd ensure log stuff happens, even without context --- 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}} //= []; }