diff --git a/frontends/src/jp/cmd_profile.py b/frontends/src/jp/cmd_profile.py index 820c2e3c..615a54fb 100644 --- a/frontends/src/jp/cmd_profile.py +++ b/frontends/src/jp/cmd_profile.py @@ -20,10 +20,12 @@ """This module permits to manage profiles. It can list, create, delete and retrieve information about a profile.""" +from sat_frontends.jp.constants import Const as C from sat.core.log import getLogger log = getLogger(__name__) from sat.core.i18n import _ from sat_frontends.jp import base +from functools import partial __commands__ = ["Profile"] @@ -167,7 +169,11 @@ class ProfileCreate(base.CommandBase): if self.args.profile in self.host.bridge.profilesListGet(): log.error("Profile %s already exists." % self.args.profile) self.host.quit(1) - self.host.bridge.profileCreate(self.args.profile, self.args.password, self.args.component, callback=self._profile_created, errback=None) + self.host.bridge.profileCreate(self.args.profile, self.args.password, self.args.component, + callback=self._profile_created, + errback=partial(self.errback, + msg=_(u"can't create profile: {}"), + exit_code=C.EXIT_BRIDGE_ERRBACK)) class ProfileModify(base.CommandBase):