Пример #1
0
 def installOn(self, other):
     # XXX check installation on other, not store
     for ls in self.store.query(userbase.LoginSystem):
         raise usage.UsageError("UserBase already installed")
     else:
         ls = userbase.LoginSystem(store=self.store)
         dependency.installOn(ls, other)
         return ls
Пример #2
0
 def _transientSchedule(self, when, now):
     if self.store.parent is not None:
         loginAccount = self.store.parent.getItemByID(self.store.idInParent)
         hook = self.store.parent.findOrCreate(
             _SubSchedulerParentHook,
             lambda hook: installOn(hook, hook.store),
             loginAccount=loginAccount)
         hook._schedule(when)
 def _transientSchedule(self, when, now):
     if self.store.parent is not None:
         loginAccount = self.store.parent.getItemByID(self.store.idInParent)
         hook = self.store.parent.findOrCreate(
             _SubSchedulerParentHook,
             lambda hook: installOn(hook, hook.store),
             loginAccount=loginAccount)
         hook._schedule(when)