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
babe3737
Commit
babe3737
authored
Feb 25, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: use deepcopy otherwise we are editing the same dict
parent
519ef4fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
dream/simulation/GUI/Batches.py
dream/simulation/GUI/Batches.py
+3
-3
No files found.
dream/simulation/GUI/Batches.py
View file @
babe3737
from
copy
import
copy
import
copy
import
json
import
time
import
random
...
...
@@ -16,7 +16,7 @@ class Simulation(ShiftsSimulation):
"short_id"
:
"C"
,
"property_list"
:
conf
[
'Dream-Queue'
][
'property_list'
]}
batch_source_entity
=
copy
(
schema
[
"entity"
])
batch_source_entity
=
copy
.
deepcopy
(
schema
[
"entity"
])
batch_source_entity
[
'_default'
]
=
"Dream.Batch"
conf
[
'Dream-BatchSource'
]
=
{
"_class"
:
"Dream.BatchSource"
,
...
...
@@ -27,7 +27,7 @@ class Simulation(ShiftsSimulation):
schema
[
'batchNumberOfUnits'
]]
}
zeroProcessingTime
=
copy
(
schema
[
'processingTime'
])
zeroProcessingTime
=
copy
.
deepcopy
(
schema
[
'processingTime'
])
for
prop
in
zeroProcessingTime
[
'property_list'
]:
if
prop
[
'id'
]
==
'mean'
:
prop
[
'_default'
]
=
0.0
...
...
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