# HG changeset patch
# User Pascal Volk <neverseen@users.sourceforge.net>
# Date 1281158186 0
# Node ID 4bba5fb90b78f8ff8a301a79a6cadadcb3d5543a
# Parent  b7a4d782860845ec3840a2933605b4665bd9977e
VMM/handler: Small code cleanups.

diff -r b7a4d7828608 -r 4bba5fb90b78 VirtualMailManager/handler.py
--- a/VirtualMailManager/handler.py	Sat Aug 07 05:13:46 2010 +0000
+++ b/VirtualMailManager/handler.py	Sat Aug 07 05:16:26 2010 +0000
@@ -135,18 +135,11 @@
             try:
                 exec_ok(val)
             except VMMError, err:
-                if err.code is NO_SUCH_BINARY:
-                    raise VMMError(_(u"'%(binary)s' doesn't exist.\n"
-                                     u"(%(cfg_file)s: section 'bin', option "
-                                     u"'%(option)s')") % {'binary': val,
-                                   'cfg_file': self._cfg_fname, 'option': opt},
-                                   err.code)
-                elif err.code is NOT_EXECUTABLE:
-                    raise VMMError(_(u"'%(binary)s' is not executable.\n"
-                                     u"(%(cfg_file)s: section 'bin', option "
-                                     u"'%(option)s')") % {'binary': val,
-                                   'cfg_file': self._cfg_fname, 'option': opt},
-                                   err.code)
+                if err.code in (NO_SUCH_BINARY, NOT_EXECUTABLE):
+                    raise VMMError(err.msg + _(u"\n(%(cfg_file)s: section "
+                                   u"'bin', option '%(option)s')") %
+                                   {'cfg_file': self._cfg_fname,
+                                    'option': opt}, err.code)
                 else:
                     raise