VMM: The Python 2.4.x compatibility commit.
--- a/VirtualMailManager/cli/subcommands.py Sun Nov 13 19:59:26 2011 +0000
+++ b/VirtualMailManager/cli/subcommands.py Sun Nov 13 20:18:41 2011 +0000
@@ -436,7 +436,8 @@
for key, value in zip(keys, list_schemes()):
if key.endswith(':'): # who knows … (see TODO above)
- key = key.rpartition(':')[0]
+ #key = key.rpartition(':')[0]
+ key = key[:-1] # This one is for Py24
w_std(key, len(key) * '-')
w_std('\n'.join(txt_wrpr.wrap(' '.join(value))), '')
--- a/VirtualMailManager/config.py Sun Nov 13 19:59:26 2011 +0000
+++ b/VirtualMailManager/config.py Sun Nov 13 20:18:41 2011 +0000
@@ -360,14 +360,12 @@
Raises a ConfigError if the configuration syntax is
invalid.
"""
+ self._cfg_file = open(self._cfg_filename, 'r')
try:
- self._cfg_file = open(self._cfg_filename, 'r')
self.readfp(self._cfg_file)
except (MissingSectionHeaderError, ParsingError), err:
raise ConfigError(str(err), CONF_ERROR)
- finally:
- if self._cfg_file and not self._cfg_file.closed:
- self._cfg_file.close()
+ self._cfg_file.close()
def check(self):
"""Performs a configuration check.