Changeset 1035

Show
Ignore:
Timestamp:
09/02/07 23:17:26 (15 months ago)
Author:
wichert
Message:

use the proper way to test against None

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pyrad/packet.py

    r1034 r1035  
    6767                UserDict.UserDict.__init__(self) 
    6868                self.code=code 
    69                 if id!=None: 
     69                if id is not None: 
    7070                        self.id=id 
    7171                else: 
     
    251251                        return 0 
    252252 
    253                 if rawreply==None: 
     253                if rawreply is None: 
    254254                        rawreply=reply.ReplyPacket() 
    255255                 
     
    378378                attr=self._PktEncodeAttributes() 
    379379 
    380                 if self.authenticator==None: 
     380                if self.authenticator is None: 
    381381                        self.authenticator=self.CreateAuthenticator() 
    382382 
    383                 if self.id==None: 
     383                if self.id is None: 
    384384                        self.id=self.CreateID() 
    385385 
     
    435435                @rtype:          string 
    436436                """ 
    437                 if self.authenticator==None: 
     437                if self.authenticator is None: 
    438438                        self.authenticator=self.CreateAuthenticator() 
    439439 
     
    506506                attr=self._PktEncodeAttributes() 
    507507 
    508                 if self.id==None: 
     508                if self.id is None: 
    509509                        self.id=self.CreateID() 
    510510