Exemplo n.º 1
0
 def handle(self, d):
     if d['type'] == 'postfix':
         with self.postfix_lock:
             return set_postfix_map(self, d['map'])
     elif d['type'] == 'mailman':
         with self.mailman_lock:
             return apply_mailman_changes(self, d['changes'])
     elif d['type'] == 'wiki':
         with self.wiki_lock:
             return apply_wiki_changes(self, d['changes'])
     elif d['type'] == 'forum':
         with self.forum_lock:
             return apply_forum_changes(self, d['changes'])
     elif d['type'] == 'setpass':
         with self.wiki_lock:
             wiki_setpass(self, d['user'], d['pass'])
         with self.forum_lock:
             forum_setpass(self, d['user'], d['pass'])
     elif d['type'] == 'update-knsite':
         with self.update_knsite_lock:
             return live_update_knsite(self)
     elif d['type'] == 'update-knfotos':
         with self.update_knfotos_lock:
             return live_update_knfotos(self)
     elif d['type'] == 'fotoadmin-create-event':
         with self.fotoadmin_lock:
             return fotoadmin_create_event(self, d['date'],
                     d['name'], d['humanname'])
     elif d['type'] == 'fotoadmin-move-fotos':
         with self.fotoadmin_lock:
             return fotoadmin_move_fotos(self, d['event'],
                     d['user'], d['dir'])
Exemplo n.º 2
0
 def handle(self, d):
         if d['type'] == 'postfix':
                 with self.postfix_lock:
                         return set_postfix_map(self, d['map'])
         elif d['type'] == 'mailman':
                 with self.mailman_lock:
                         return apply_mailman_changes(self,
                                         d['changes'])
         elif d['type'] == 'wiki':
                 with self.wiki_lock:
                         return apply_wiki_changes(self, d['changes'])
         elif d['type'] == 'forum':
                 with self.forum_lock:
                         return apply_forum_changes(self, d['changes'])
         elif d['type'] == 'setpass':
                 with self.wiki_lock:
                         wiki_setpass(self, d['user'], d['pass'])
                 with self.forum_lock:
                         forum_setpass(self, d['user'], d['pass'])
Exemplo n.º 3
0
 def handle(self, d):
     if d['type'] == 'postfix':
         with self.postfix_lock:
             return set_postfix_map(self, d['map'])
     elif d['type'] == 'postfix-slm':
         with self.postfix_slm_lock:
             return set_postfix_slm_map(self, d['map'])
     elif d['type'] == 'mailman':
         with self.mailman_lock:
             return apply_mailman_changes(self, d['changes'])
     elif d['type'] == 'wiki':
         with self.wiki_lock:
             return apply_wiki_changes(self, d['changes'])
     elif d['type'] == 'ldap':
         with self.ldap_lock:
             return apply_ldap_changes(self, d['changes'])
     elif d['type'] == 'forum':
         with self.forum_lock:
             return apply_forum_changes(self, d['changes'])
     elif d['type'] == 'setpass':
         with self.ldap_lock:
             ldap_setpass(self, d['user'], d['pass'])
         with self.wiki_lock:
             wiki_setpass(self, d['user'], d['pass'])
         with self.forum_lock:
             forum_setpass(self, d['user'], d['pass'])
     elif d['type'] == 'update-knsite':
         with self.update_knsite_lock:
             return live_update_knsite(self)
     elif d['type'] == 'update-knfotos':
         with self.update_knfotos_lock:
             return live_update_knfotos(self)
     elif d['type'] == 'fotoadmin-create-event':
         with self.fotoadmin_lock:
             return fotoadmin_create_event(self, d['date'], d['name'],
                                           d['humanname'])
     elif d['type'] == 'fotoadmin-move-fotos':
         with self.fotoadmin_lock:
             return fotoadmin_move_fotos(self, d['event'], d['user'],
                                         d['dir'])
Exemplo n.º 4
0
 def handle(self, d):
     if d['type'] == 'postfix':
         with self.postfix_lock:
             return set_postfix_map(self, d['map'])
     elif d['type'] == 'postfix-slm':
         with self.postfix_slm_lock:
             return set_postfix_slm_map(self, d['map'])
     elif d['type'] == 'quassel':
         with self.quassel_lock:
             return apply_quassel_changes(self, d['changes'])
     elif d['type'] == 'wiki':
         with self.wiki_lock:
             return apply_wiki_changes(self, d['changes'])
     elif d['type'] == 'ldap':
         with self.ldap_lock:
             return apply_ldap_changes(self, d['changes'])
     elif d['type'] == 'forum':
         with self.forum_lock:
             return apply_forum_changes(self, d['changes'])
     elif d['type'] == 'setpass':
         with self.ldap_lock:
             ldap_setpass(self, d['user'], d['pass'])
         with self.wiki_lock:
             wiki_setpass(self, d['user'], d['pass'])
         with self.quassel_lock:
             quassel_setpass(self, d['user'], d['pass'])
         with self.forum_lock:
             forum_setpass(self, d['user'], d['pass'])
     elif d['type'] == 'fotoadmin-create-event':
         with self.fotoadmin_lock:
             return fotoadmin_create_event(self, d['date'],
                                           d['name'], d['humanname'])
     elif d['type'] == 'fotoadmin-move-fotos':
         with self.fotoadmin_lock:
             return fotoadmin_move_fotos(self, d['event'],
                                         d['store'], d['user'], d['dir'])