Ejemplo n.º 1
0
 def __init__(self, **kwargs):
     """the lockhandler works the same as for objects.
     optional kwargs will be set as properties on the Command at runtime,
     overloading evential same-named class properties."""
     if kwargs:
         _init_command(self, **kwargs)
     self.lockhandler = LockHandler(self)
Ejemplo n.º 2
0
 def __init__(self,
              senders=None,
              receivers=None,
              channels=None,
              message="",
              header="",
              type="",
              lockstring="",
              hide_from=None):
     self.senders = senders and make_iter(senders) or []
     self.receivers = receivers and make_iter(receivers) or []
     self.channels = channels and make_iter(channels) or []
     self.type = type
     self.header = header
     self.message = message
     self.lock_storage = lockstring
     self.locks = LockHandler(self)
     self.hide_from = hide_from and make_iter(hide_from) or []
     self.date_sent = datetime.now()
Ejemplo n.º 3
0
 def locks(self):
     return LockHandler(self)
Ejemplo n.º 4
0
 def __init__(self, *args, **kwargs):
     SharedMemoryModel.__init__(self, *args, **kwargs)
     self.locks = LockHandler(self)
     self.extra_senders = []
Ejemplo n.º 5
0
 def __init__(self, *args, **kwargs):
     SharedMemoryModel.__init__(self, *args, **kwargs)
     self.locks = LockHandler(self)
     self.tags = TagHandler(self)