Changeset 9836

Show
Ignore:
Timestamp:
06/25/08 08:56:03 (2 months ago)
Author:
asterix
Message:

don't think connection to server failed when only first connection attempt failed when creating a new account

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/common/connection.py

    r9824 r9836  
    252252 
    253253        def _connection_lost(self): 
     254                log.debug('_connection_lost') 
    254255                self.disconnect(on_purpose = False) 
    255256                self.dispatch('STATUS', 'offline') 
     
    517518 
    518519        def connect_to_next_type(self, retry=False): 
     520                log.debug('Connection to next type') 
    519521                if len(self._connection_types): 
    520522                        self._current_type = self._connection_types.pop(0) 
     
    558560 
    559561        def connect_to_next_host(self, retry = False): 
     562                log.debug('Connection to next host') 
    560563                if len(self._hosts): 
    561564                        # No config option exist when creating a new account 
     
    12801283        def _on_new_account(self, con = None, con_type = None): 
    12811284                if not con_type: 
     1285                        if len(self._connection_types) or len(self._hosts): 
     1286                                # There are still other way to try to connect 
     1287                                return 
    12821288                        self.dispatch('NEW_ACC_NOT_CONNECTED', 
    12831289                                (_('Could not connect to "%s"') % self._hostname))