]> git.proxmox.com Git - pve-cluster.git/commitdiff
avoid warning
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 17 Nov 2011 10:22:46 +0000 (11:22 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 17 Nov 2011 10:22:46 +0000 (11:22 +0100)
data/PVE/Cluster.pm

index 16cea0b502a9a3e56742feb9c6d69dbc234da5cc..8378ca67cd36768cbeb7ebdfa25fdbf6e4818a60 100644 (file)
@@ -720,7 +720,7 @@ sub create_rrd_graph {
 sub get_config {
     my ($path) = @_;
 
-    return  &$ipcc_get_config($path);
+    return &$ipcc_get_config($path);
 }
 
 sub get_cluster_log {
@@ -751,8 +751,9 @@ my $ccache_read = sub {
 
     my $ci = $ccache->{$filename};
 
-    if (!$ci->{version} || $ci->{version} != $version) {
-
+    if (!$ci->{version} || !$version || $ci->{version} != $version) {
+       # we always call the parser, even when the file does not exists
+       # (in that case $data is undef)
        my $data = get_config($filename);
        $ci->{data} = &$parser("/etc/pve/$filename", $data);
        $ci->{version} = $version;