From 516744caf3f0a46bf56528bdabb2128fef791327 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Thu, 20 Sep 2007 02:50:17 +0000 Subject: Change the error handling of the Wallet::ACL list() method to return the empty list on errors and clear error() so that it can be used to distinguish between an error and an empty ACL. --- perl/Wallet/Server.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'perl/Wallet/Server.pm') diff --git a/perl/Wallet/Server.pm b/perl/Wallet/Server.pm index 894a52e..b646eb0 100644 --- a/perl/Wallet/Server.pm +++ b/perl/Wallet/Server.pm @@ -555,7 +555,7 @@ sub acl_remove { } if ($acl->name eq 'ADMIN') { my @e = $acl->list; - if (@e == 1 and not defined ($e[0])) { + if (not @e and $acl->error) { $self->error ($acl->error); return undef; } elsif (@e == 1 && $e[0][0] eq $scheme && $e[0][1] eq $identifier) { -- cgit v1.2.3