comparison frontends/src/jp/cmd_profile.py @ 893:308a96bc7c1b

core, frontends: add method asyncDeleteProfile, remove synchronous methods createProfile and deleteProfile
author souliane <souliane@mailoo.org>
date Mon, 03 Mar 2014 09:59:10 +0100
parents c39117d00f35
children d87aa6bdb0b4
comparison
equal deleted inserted replaced
892:58107179cd97 893:308a96bc7c1b
40 def run(self): 40 def run(self):
41 super(ProfileDelete, self).run() 41 super(ProfileDelete, self).run()
42 if self.args.profile not in self.host.bridge.getProfilesList(): 42 if self.args.profile not in self.host.bridge.getProfilesList():
43 error("Profile %s doesn't exist." % self.args.profile) 43 error("Profile %s doesn't exist." % self.args.profile)
44 self.host.quit(1) 44 self.host.quit(1)
45 self.host.bridge.deleteProfile(self.args.profile) 45 self.host.bridge.asyncDeleteProfile(self.args.profile, callback=lambda dummy: None)
46 46
47 47
48 class ProfileInfo(base.CommandBase): 48 class ProfileInfo(base.CommandBase):
49 def __init__(self, host): 49 def __init__(self, host):
50 super(ProfileInfo, self).__init__(host, 'info', use_profile=False, help=_('Get informations about a profile')) 50 super(ProfileInfo, self).__init__(host, 'info', use_profile=False, help=_('Get informations about a profile'))