Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos.core
Commits
714a191f
Commit
714a191f
authored
Nov 10, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not die in case of instance damaged XML.
parent
60ae55a9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
master/product/Vifib/Tool/SlapTool.py
master/product/Vifib/Tool/SlapTool.py
+14
-10
No files found.
master/product/Vifib/Tool/SlapTool.py
View file @
714a191f
...
@@ -412,6 +412,7 @@ class SlapTool(BaseTool):
...
@@ -412,6 +412,7 @@ class SlapTool(BaseTool):
def
_instanceXmlToDict
(
self
,
xml
):
def
_instanceXmlToDict
(
self
,
xml
):
result_dict
=
{}
result_dict
=
{}
try
:
if
xml
is
not
None
and
xml
!=
''
:
if
xml
is
not
None
and
xml
!=
''
:
tree
=
etree
.
fromstring
(
xml
.
encode
(
'utf-8'
))
tree
=
etree
.
fromstring
(
xml
.
encode
(
'utf-8'
))
for
element
in
tree
.
findall
(
'parameter'
):
for
element
in
tree
.
findall
(
'parameter'
):
...
@@ -422,6 +423,9 @@ class SlapTool(BaseTool):
...
@@ -422,6 +423,9 @@ class SlapTool(BaseTool):
else
:
else
:
value
=
element
.
text
value
=
element
.
text
result_dict
[
key
]
=
value
result_dict
[
key
]
=
value
except
(
etree
.
XMLSchemaError
,
etree
.
XMLSchemaParseError
,
etree
.
XMLSchemaValidateError
,
etree
.
XMLSyntaxError
):
LOG
(
'SlapTool'
,
INFO
,
'Issue during parsing xml:'
,
error
=
True
)
return
result_dict
return
result_dict
def
_getSlapPartitionByPackingList
(
self
,
computer_partition_document
):
def
_getSlapPartitionByPackingList
(
self
,
computer_partition_document
):
...
...
Write
Preview
Markdown
is supported
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