Changeset 2336

Show
Ignore:
Timestamp:
07/15/05 22:04:02 (3 years ago)
Author:
nk
Message:

add some if connection:

Files:
1 modified

Legend:

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

    r2318 r2336  
    820820                                    p.setTag(common.xmpp.NS_SIGNED + ' x').setData(signed) 
    821821 
    822                                 self.connection.send(p) 
     822                                if self.connection: 
     823                                        self.connection.send(p) 
    823824                                self.dispatch('STATUS', show) 
    824825                                #ask our VCard 
     
    836837                                if msg: 
    837838                                        p.setStatus(msg) 
    838                                 self.connection.send(p) 
     839                                if self.connection: 
     840                                        self.connection.send(p) 
    839841                                try: 
    840842                                        self.connection.disconnect() 
     
    854856                        if signed: 
    855857                                p.setTag(common.xmpp.NS_SIGNED + ' x').setData(signed) 
    856                         self.connection.send(p) 
     858                        if connection: 
     859                                self.connection.send(p) 
    857860                        self.dispatch('STATUS', show) 
    858861