equal
deleted
inserted
replaced
87 self._save_changes() |
87 self._save_changes() |
88 |
88 |
89 def _save_changes(self): |
89 def _save_changes(self): |
90 """Writes changes to the configuration file.""" |
90 """Writes changes to the configuration file.""" |
91 copy2(self._cfg_filename, self._cfg_filename + '.bak') |
91 copy2(self._cfg_filename, self._cfg_filename + '.bak') |
92 self._cfg_file = open(self._cfg_filename, 'w') |
92 with open(self._cfg_filename, 'w') as self._cfg_file: |
93 self.write(self._cfg_file) |
93 self.write(self._cfg_file) |
94 self._cfg_file.close() |
|
95 |
94 |
96 del _ |
95 del _ |