# HG changeset patch # User Pascal Volk # Date 1321215521 0 # Node ID 90d69ae4f40d117f4ba94fb986e892f84e9280f1 # Parent 099de308fd98020ef0a37d1e924fcacca1987ed4 VMM: The Python 2.4.x compatibility commit. diff -r 099de308fd98 -r 90d69ae4f40d VirtualMailManager/cli/subcommands.py --- 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))), '') diff -r 099de308fd98 -r 90d69ae4f40d VirtualMailManager/config.py --- 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.