From af2de0eea22abea3caa69d23cad6e7fb59646cec Mon Sep 17 00:00:00 2001 From: Cristian C Lalescu <Cristian.Lalescu@ds.mpg.de> Date: Mon, 22 May 2017 12:58:03 +0200 Subject: [PATCH] fix creation of particle file --- bfps/DNS.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bfps/DNS.py b/bfps/DNS.py index be0ba764..f9cf92c4 100644 --- a/bfps/DNS.py +++ b/bfps/DNS.py @@ -916,7 +916,7 @@ class DNS(_code): species = 0, rseed = opt.particle_rand_seed) if not os.path.exists(self.get_particle_file_name()): - with particle_file = h5py.File(self.get_particle_file_name(), 'w'): + with h5py.File(self.get_particle_file_name(), 'w') as particle_file: particle_file.create_group('tracers0/velocity') self.run( nb_processes = opt.nb_processes, -- GitLab