summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/VyattaConfig.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/VyattaConfig.pm b/scripts/VyattaConfig.pm
index 6c37073..15837d4 100644
--- a/scripts/VyattaConfig.pm
+++ b/scripts/VyattaConfig.pm
@@ -345,12 +345,19 @@ sub listNodeStatus {
my %nodehash = ();
# find deleted nodes first
+ if(!$self || !$path ) {
+ return %nodehash;
+ }
+
@nodes = $self->listDeleted("$path");
+ if(!@nodes) {
+ return %nodehash;
+ }
+
foreach my $node (@nodes) {
if ($node =~ /.+/) { $nodehash{$node} = "deleted" };
}
- @nodes = ();
@nodes = $self->listNodes("$path");
foreach my $node (@nodes) {
if ($node =~ /.+/) {