projects
/
sawsim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a71fe60
)
Fix cache shuffling (random.shuffle() shuffles in place, returns None).
author
W. Trevor King
<wking@drexel.edu>
Sun, 24 Oct 2010 13:47:53 +0000
(09:47 -0400)
committer
W. Trevor King
<wking@drexel.edu>
Sun, 24 Oct 2010 13:48:27 +0000
(09:48 -0400)
pysawsim/sawsim.py
patch
|
blob
|
history
diff --git
a/pysawsim/sawsim.py
b/pysawsim/sawsim.py
index c0589ef0b1e33f2080bee6f5b10abc83bacbbc2f..0e73940adc6b39368e8061fa17ed601e5479f56b 100644
(file)
--- a/
pysawsim/sawsim.py
+++ b/
pysawsim/sawsim.py
@@
-208,7
+208,9
@@
class SawsimRunner (object):
def _load_cached_data(self, param_string):
pcd = self._param_cache_dir(param_string)
- for filename in shuffle(os.listdir(pcd)):
+ filenames = os.listdir(pcd)
+ shuffle(filenames)
+ for filename in filenames:
if not filename.endswith('.dat'):
continue
with open(os.path.join(pcd, filename), 'r') as f: