]> git.proxmox.com Git - pve-common.git/commitdiff
LDAP: fix missing newline in error message
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 9 Mar 2020 16:29:37 +0000 (17:29 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 9 Mar 2020 16:30:29 +0000 (17:30 +0100)
seems like LDAP->new doesn't adds it, so we get the ". at
/path/to/module.pm line xy" ugly error

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/LDAP.pm

index cb889776d88f6aff73c35d35ab276ad8c864e15d..3288146d92914cb34dc323ae90e7e128eb59d967 100644 (file)
@@ -38,7 +38,7 @@ sub ldap_connect {
        $ldap_opts{$opt} = $opts->{$opt} if $opts->{$opt};
     }
 
        $ldap_opts{$opt} = $opts->{$opt} if $opts->{$opt};
     }
 
-    my $ldap = Net::LDAP->new($hosts, %ldap_opts) || die $@;
+    my $ldap = Net::LDAP->new($hosts, %ldap_opts) || die "$@\n";
 
     if ($start_tls) {
        $ldap->start_tls(%$opts);
 
     if ($start_tls) {
        $ldap->start_tls(%$opts);