changeset 10931 | 6168a45f62df |
parent 10719 | 065b5ac5c039 |
child 11000 | dc9de651c328 |
--- a/cwconfig.py Wed Nov 25 17:57:07 2015 +0100 +++ b/cwconfig.py Wed Nov 25 16:22:42 2015 +0100 @@ -1059,7 +1059,8 @@ def save(self): """write down current configuration""" - self.generate_config(open(self.main_config_file(), 'w')) + with open(self.main_config_file(), 'w') as fobj: + self.generate_config(fobj) def check_writeable_uid_directory(self, path): """check given directory path exists, belongs to the user running the