Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
f72a6aee
Commit
f72a6aee
authored
Jan 20, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LineGenerationJSON: output result in the same json, under "result" key
parent
cb6e1cc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+15
-8
No files found.
dream/simulation/LineGenerationJSON.py
View file @
f72a6aee
...
...
@@ -661,7 +661,6 @@ def main(argv=[], input_data=None):
ExcelHandler
.
outputTrace
(
'trace'
+
str
(
i
))
ExcelHandler
.
resetTrace
()
G
.
outputJSONFile
=
open
(
'outputJSON.json'
,
mode
=
'w'
)
G
.
outputJSON
[
'_class'
]
=
'Dream.Simulation'
;
G
.
outputJSON
[
'general'
]
=
{};
G
.
outputJSON
[
'general'
][
'_class'
]
=
'Dream.Configuration'
;
...
...
@@ -674,16 +673,24 @@ def main(argv=[], input_data=None):
object
.
outputResultsJSON
()
outputJSONString
=
json
.
dumps
(
G
.
outputJSON
,
indent
=
True
)
G
.
outputJSONFile
.
write
(
outputJSONString
)
if
0
:
G
.
outputJSONFile
=
open
(
'outputJSON.json'
,
mode
=
'w'
)
G
.
outputJSONFile
.
write
(
outputJSONString
)
if
not
input_data
:
# Output on stdout
print
outputJSONString
# XXX I am not sure we still need this case
return
print
G
.
JSONData
# XXX result_list is not needed here, we could replace result by result_list
G
.
JSONData
[
'result'
]
=
{
'result_list'
:
[
G
.
outputJSON
]}
#logger.info("execution time="+str(time.time()-start))
if
input_data
:
return
outputJSONString
# Output on stdout
print
outputJSONString
return
json
.
dumps
(
G
.
JSONData
,
indent
=
True
)
if
__name__
==
'__main__'
:
# cProfile.run('main()')
main
()
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