Am 06.01.2014 22:38, schrieb Mike Frysinger: > On Monday 06 January 2014 16:04:16 sebastianlut...@gmx.de wrote: >> + f = open(layout_conf_path, "w") + >> f.write("masters = >> test_repo\n") + f.close() > > please use "with" in your code with open(layout_conf_path, 'w') as > f: f.write('masters = test_repo\n') -mike > Arfrever pointed this out on IRC and I already send a new version of this patch that uses "with".
- [gentoo-portage-dev] [PATCH 1/2] ResolverPlayground: Writ... SebastianLuther
- [gentoo-portage-dev] [PATCH 2/2] Fix unecessary rebu... SebastianLuther
- [gentoo-portage-dev] [PATCH] ResolverPlayground: Wri... SebastianLuther
- Re: [gentoo-portage-dev] [PATCH 1/2] ResolverPlaygro... Mike Frysinger
- Re: [gentoo-portage-dev] [PATCH 1/2] ResolverPla... Sebastian Luther