fix exception handling in command system
This commit is contained in:
parent
a75fba495b
commit
ea973ddc2e
|
@ -158,7 +158,7 @@ class Command(object):
|
|||
# in case if they was not set by the one who raised an exception.
|
||||
except CommandError, error:
|
||||
if not error.command and not error.name:
|
||||
raise CommandError(exception.message, self)
|
||||
raise CommandError(error.message, self)
|
||||
raise
|
||||
|
||||
# This one is a little bit too wide, but as Python does not have
|
||||
|
|
|
@ -22,6 +22,7 @@ from common import gajim
|
|||
from common import helpers
|
||||
from common.exceptions import GajimGeneralException
|
||||
|
||||
from ..errors import CommandError
|
||||
from ..framework import CommandContainer, command, documentation
|
||||
from ..mapping import generate_usage
|
||||
|
||||
|
|
Loading…
Reference in New Issue