コード例 #1
0
ファイル: tools.py プロジェクト: maximerobin/Ufwi
 def checkServiceCall(self, context, service_name):
     if 'rebootSystem' == service_name \
     and context.isComponentContext() \
     and 'config' == context.component.name:
         # config component doesn't need a lock to reboot the system
         return
     AbstractNuConfComponent.checkServiceCall(self, context, service_name)
コード例 #2
0
ファイル: unix_service.py プロジェクト: maximerobin/Ufwi
    def checkServiceCall(self, context, service_name):
        """Allow each component to call their reload, restart, start and stop services"""
        if (context.isComponentContext() and context.ownerString() == self.NAME
          and service_name in ['reload', 'restart', 'start', 'status', 'stop']):
            return

        AbstractNuConfComponent.checkServiceCall(self, context, service_name)
コード例 #3
0
ファイル: contact.py プロジェクト: maximerobin/Ufwi
 def checkServiceCall(self, context, service_name):
     if 'sendMailToAdmin' == service_name:
         # lock is not needed when sending an email
         return
     return AbstractNuConfComponent.checkServiceCall(self, context, service_name)