subscription: handle missing subscription info

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2022-09-07 10:47:05 +02:00
parent dbfcac27d5
commit 25eaf729d7

View File

@ -62,7 +62,7 @@ sub read_etc_subscription {
my $info = Proxmox::RS::Subscription::read_subscription($filename);
return $info if $info->{status} ne 'active';
return $info if !$info || $info->{status} ne 'active';
my ($sockets, $level);
eval { ($sockets, $level) = check_key($info->{key}, $req_sockets); };