# HG changeset patch
# User Pascal Volk <neverseen@users.sourceforge.net>
# Date 1281325921 0
# Node ID a653c43048b18657db0cdb1654e761da22c5f3fc
# Parent  2ae40cd0d2131cb7f26fd4d135fe518b34639db9
VMM/cli/main: Adjusted _get_handler() to changes in config module.

diff -r 2ae40cd0d213 -r a653c43048b1 VirtualMailManager/cli/main.py
--- a/VirtualMailManager/cli/main.py	Mon Aug 09 03:48:28 2010 +0000
+++ b/VirtualMailManager/cli/main.py	Mon Aug 09 03:52:01 2010 +0000
@@ -14,9 +14,8 @@
 from VirtualMailManager.config import BadOptionError, ConfigValueError
 from VirtualMailManager.cli import w_err
 from VirtualMailManager.cli.handler import CliHandler
-from VirtualMailManager.constants import CONF_ERROR, DATABASE_ERROR, \
-     EX_MISSING_ARGS, EX_SUCCESS, EX_UNKNOWN_COMMAND, EX_USER_INTERRUPT, \
-     INVALID_ARGUMENT
+from VirtualMailManager.constants import DATABASE_ERROR, EX_MISSING_ARGS, \
+     EX_SUCCESS, EX_UNKNOWN_COMMAND, EX_USER_INTERRUPT, INVALID_ARGUMENT
 from VirtualMailManager.cli.subcommands import RunContext, cmd_map, usage
 
 
@@ -27,13 +26,11 @@
     """Try to get a CliHandler. Exit the program when an error occurs."""
     try:
         handler = CliHandler()
-        handler.cfg_install()
     except (errors.NotRootError, errors.PermissionError, errors.VMMError,
             errors.ConfigError), err:
         w_err(err.code, _(u'Error: %s') % err.msg)
-    except ConfigValueError, err:
-        w_err(CONF_ERROR, _(u'Error: %s') % err)
     else:
+        handler.cfg_install()
         return handler