Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Boris Kocherov
erp5
Commits
841d4a5a
Commit
841d4a5a
authored
11 years ago
by
Aurel
Committed by
Jérome Perrin
11 years ago
Browse files
Options
Download
Email Patches
Plain Diff
make diff even if not xml
parent
f92f62cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
bt5/erp5_syncml/ExtensionTemplateItem/portal_components/extension.erp5.SyncMLTool.py
...mplateItem/portal_components/extension.erp5.SyncMLTool.py
+11
-4
bt5/erp5_syncml/bt/revision
bt5/erp5_syncml/bt/revision
+1
-1
No files found.
bt5/erp5_syncml/ExtensionTemplateItem/portal_components/extension.erp5.SyncMLTool.py
View file @
841d4a5a
...
...
@@ -35,12 +35,19 @@ def diffXML(xml_plugin="", xml_erp5="", html=True):
xml_plugin
=
"<object>Not found</object>"
if
xml_erp5
==
""
:
xml_erp5
=
"<object>Not found</object>"
xml
=
etree
.
fromstring
(
xml_erp5
)
xml_erp5
=
etree
.
tostring
(
xml
,
pretty_print
=
True
,
encoding
=
"utf-8"
)
try
:
xml
=
etree
.
fromstring
(
xml_erp5
)
xml_erp5
=
etree
.
tostring
(
xml
,
pretty_print
=
True
,
encoding
=
"utf-8"
)
except
etree
.
XMLSyntaxError
:
pass
if
isinstance
(
xml_plugin
,
unicode
):
xml_plugin
=
xml_plugin
.
encode
(
'utf-8'
)
xml
=
etree
.
fromstring
(
xml_plugin
)
xml_plugin
=
etree
.
tostring
(
xml
,
pretty_print
=
True
,
encoding
=
"utf-8"
)
try
:
xml
=
etree
.
fromstring
(
xml_plugin
)
xml_plugin
=
etree
.
tostring
(
xml
,
pretty_print
=
True
,
encoding
=
"utf-8"
)
except
etree
.
XMLSyntaxError
:
pass
diff_list
=
list
(
unified_diff
(
xml_plugin
.
split
(
'
\n
'
),
xml_erp5
.
split
(
'
\n
'
),
tofile
=
"erp5 xml"
,
fromfile
=
"plugin xml"
,
lineterm
=
''
))
if
len
(
diff_list
)
!=
0
:
...
...
This diff is collapsed.
Click to expand it.
bt5/erp5_syncml/bt/revision
View file @
841d4a5a
11
8
11
9
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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