VMM{/cli}/config: Explicitly pass utf-8 as the encoding to open().
--- a/VirtualMailManager/cli/config.py Sun Dec 02 14:54:24 2012 +0000
+++ b/VirtualMailManager/cli/config.py Sun Dec 02 15:51:17 2012 +0000
@@ -89,7 +89,7 @@
def _save_changes(self):
"""Writes changes to the configuration file."""
copy2(self._cfg_filename, self._cfg_filename + '.bak')
- with open(self._cfg_filename, 'w') as self._cfg_file:
+ with open(self._cfg_filename, 'w', encoding='utf-8') as self._cfg_file:
self.write(self._cfg_file)
del _
--- a/VirtualMailManager/config.py Sun Dec 02 14:54:24 2012 +0000
+++ b/VirtualMailManager/config.py Sun Dec 02 15:51:17 2012 +0000
@@ -358,7 +358,7 @@
Raises a ConfigError if the configuration syntax is
invalid.
"""
- with open(self._cfg_filename, 'r') as self._cfg_file:
+ with open(self._cfg_filename, 'r', encoding='utf-8') as self._cfg_file:
try:
self.readfp(self._cfg_file)
except (MissingSectionHeaderError, ParsingError) as err: