VirtualMailManager/cli/config.py
branchv0.7.x
changeset 642 4cd9d0a9f42f
parent 568 14abdd04ddf5
child 643 df1e3b67882a
equal deleted inserted replaced
641:724ac0a4068d 642:4cd9d0a9f42f
    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 _