revert latest commit I did (sorry)

This commit is contained in:
Yann Leboulanger 2005-05-09 10:34:47 +00:00
parent 0c8b0bbde2
commit 0f66868a70
2 changed files with 23 additions and 24 deletions

View File

@ -767,31 +767,31 @@ class Connection:
proxy = {'host': proxyhost, 'port': proxyport} proxy = {'host': proxyhost, 'port': proxyport}
else: else:
proxy = None proxy = None
c = common.xmpp.Client(server = hostname) c = common.xmpp.Client(server = hostname, debug = [])
# try: try:
c.connect(proxy = proxy) c.connect(proxy = proxy)
# except: except:
# gajim.log.debug('Couldn\'t connect to %s' % hostname) gajim.log.debug('Couldn\'t connect to %s' % hostname)
# self.dispatch('ERROR', _('Couldn\'t connect to ') + hostname) self.dispatch('ERROR', _('Couldn\'t connect to ') + hostname)
# return 0 return 0
# else:
gajim.log.debug('Connected to server')
req = common.xmpp.features.getRegInfo(c, hostname).asDict() # FIXME! This blocks!
req['username'] = login
req['password'] = password
if not common.xmpp.features.register(c, hostname,req): #FIXME: error
self.dispatch('ERROR', _('Error: ') + c.lastErr)
else: else:
self.name = name gajim.log.debug(_('Connected to server'))
self.connected = 0 req = common.xmpp.features.getRegInfo(c, hostname).asDict() # FIXME! This blocks!
self.password = password req['username'] = login
if USE_GPG: req['password'] = password
self.gpg = GnuPG.GnuPG() if not common.xmpp.features.register(c, hostname,req): #FIXME: error
gajim.config.set('usegpg', True) self.dispatch('ERROR', _('Error: ') + c.lastErr)
else: else:
gajim.config.set('usegpg', False) self.name = name
self.dispatch('ACC_OK', (hostname, login, password, name, self.connected = 0
resource, prio, use_proxy, proxyhost, proxyport)) self.password = password
if USE_GPG:
self.gpg = GnuPG.GnuPG()
gajim.config.set('usegpg', True)
else:
gajim.config.set('usegpg', False)
self.dispatch('ACC_OK', (hostname, login, password, name,
resource, prio, use_proxy, proxyhost, proxyport))
def account_changed(self, new_name): def account_changed(self, new_name):
self.name = new_name self.name = new_name

View File

@ -25,5 +25,4 @@ version = '0.7'
config = common.config.Config() config = common.config.Config()
connections = {} connections = {}
log = logging.getLogger('Gajim') log = logging.getLogger('Gajim')
log.setLevel(logging.DEBUG)
logger = common.logger.Logger() logger = common.logger.Logger()