Пример #1
0
 def __getitem__(self, k):
     #you shouldn't be getting a buddy from a disconnected protocol
     #note: this assert will get hit if you disconnect while still logging in.
     assert not self._dead
     try:
         return FilterDict.__getitem__(self, k)
     except (KeyError,):
         return self.setdefault(self.ff(k), OscarBuddy(k, self.protocol))
Пример #2
0
 def __init__(self, protocol):
     ObservableDict.__init__(self)
     FilterDict.__init__(self, oscar._lowerstrip)
     self.protocol = protocol