Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
0
Merge Requests
0
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
Hamza
erp5-Boxiang
Commits
172e023a
Commit
172e023a
authored
Jun 12, 2013
by
Benjamin Blanc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Up
parent
8cd0a55a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
erp5/util/testnode/testnodeUtils.py
erp5/util/testnode/testnodeUtils.py
+25
-0
No files found.
erp5/util/testnode/testnodeUtils.py
0 → 100644
View file @
172e023a
import
sys
import
json
import
shutil
import
string
def
deunicodeData
(
data
):
if
isinstance
(
data
,
int
):
new_data
=
data
elif
isinstance
(
data
,
str
):
new_data
=
data
elif
isinstance
(
data
,
list
):
new_data
=
[]
for
sub_data
in
data
:
new_data
.
append
(
deunicodeData
(
sub_data
))
elif
isinstance
(
data
,
unicode
):
new_data
=
data
.
encode
(
'utf8'
)
elif
isinstance
(
data
,
dict
):
new_data
=
{}
for
key
,
value
in
data
.
iteritems
():
key
=
deunicodeData
(
key
)
value
=
deunicodeData
(
value
)
new_data
[
key
]
=
value
else
:
new_data
=
data
return
new_data
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