Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
a95afc87
Commit
a95afc87
authored
Apr 18, 2011
by
Jonathon Duerig
Browse files
Bugfix: Check for existence of outer-tag when grabbing inner-tag [rspecv2]
parent
82a9fc4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
protogeni/lib/GeniXML.pm.in
View file @
a95afc87
...
...
@@ -308,7 +308,9 @@ sub GetBandwidth($)
$result = GeniXML::GetText("bandwidth", $link);
} else {
my $prop = FindFirst("n:property", $link);
$result = GeniXML::GetText("capacity", $prop);
if (defined($prop)) {
$result = GeniXML::GetText("capacity", $prop);
}
}
return $result;
}
...
...
@@ -418,7 +420,9 @@ sub GetStartupCommand($)
$result = GetText("startup_command", $node);
} else {
my $execute = FindFirst("n:services/n:execute", $node);
$result = GetText("command", $execute);
if (defined($execute)) {
$result = GetText("command", $execute);
}
}
return $result;
}
...
...
@@ -486,7 +490,9 @@ sub GetVirtualizationSubtype($)
$
result
=
GetText
(
"virtualization_subtype"
,
$
node
);
}
else
{
my
$
type
=
FindFirst
(
"n:sliver_type"
,
$
node
);
$
result
=
GetText
(
"name"
,
$
type
);
if
(
defined
($
type
))
{
$
result
=
GetText
(
"name"
,
$
type
);
}
}
return
$
result
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment