Changeset 125

Show
Ignore:
Timestamp:
04/23/02 20:12:16 (6 years ago)
Author:
sholloway
Message:

Bugfix

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/RBJabber/RBJabber/SubjectObserver/AttributedSubject.py

    r66 r125  
    4949        if '_' != name[0]: 
    5050            result = self._attributes.get(name, None) 
    51             if result != None: 
     51            if result is not None: 
    5252                return result 
    5353        return super(AttributedSubjectMixin, self).__getattribute__(name) 
     
    6060            return super(AttributedSubjectMixin, self).__setattr__(name, value) 
    6161 
     62    def __delattr__(self, name): 
     63        if '_' != name[0]: 
     64            if name in self._attributes: 
     65                del self._attributes[name] 
     66                apply(self.UpdateObservers, tuple(), {name: None}) 
     67        else: 
     68            return super(AttributedSubjectMixin, self).__delattr__(name) 
     69 
    6270#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    6371