comparison frontends/src/wix/profile_manager.py @ 1011:5a6354ff468c

wix: use of new logging system
author Goffi <goffi@goffi.org>
date Mon, 05 May 2014 20:12:21 +0200
parents 308a96bc7c1b
children c4c14480715a
comparison
equal deleted inserted replaced
1010:73a0b7f94674 1011:5a6354ff468c
19 19
20 20
21 21
22 from sat.core.i18n import _ 22 from sat.core.i18n import _
23 import wx 23 import wx
24 from logging import debug, info, error 24 from sat.core.log import getLogger
25 log = getLogger(__name__)
25 from sat.tools.jid import JID 26 from sat.tools.jid import JID
26 27
27 28
28 class ProfileManager(wx.Panel): 29 class ProfileManager(wx.Panel):
29 def __init__(self, host): 30 def __init__(self, host):
143 144
144 def __old_passReceived(self, old_jid, old_pass, profile): 145 def __old_passReceived(self, old_jid, old_pass, profile):
145 new_jid = self.login_jid.GetValue() 146 new_jid = self.login_jid.GetValue()
146 new_pass = self.login_pass.GetValue() 147 new_pass = self.login_pass.GetValue()
147 if old_jid != new_jid: 148 if old_jid != new_jid:
148 debug(_('Saving new JID and server')) 149 log.debug(_('Saving new JID and server'))
149 self.host.bridge.setParam("JabberID", new_jid, "Connection", profile_key=profile) 150 self.host.bridge.setParam("JabberID", new_jid, "Connection", profile_key=profile)
150 self.host.bridge.setParam("Server", JID(new_jid).domain, "Connection", profile_key=profile) 151 self.host.bridge.setParam("Server", JID(new_jid).domain, "Connection", profile_key=profile)
151 if old_pass != new_pass: 152 if old_pass != new_pass:
152 debug(_('Saving new password')) 153 log.debug(_('Saving new password'))
153 self.host.bridge.setParam("Password", new_pass, "Connection", profile_key=profile) 154 self.host.bridge.setParam("Password", new_pass, "Connection", profile_key=profile)
154 self.host.plug_profile(profile) 155 self.host.plug_profile(profile)
155 156
156 157
157 def getParamError(self, ignore): 158 def getParamError(self, ignore):