示例#1
0
def _webapp_health_monitor(argv):
    parser = argparse.ArgumentParser()
    parser.add_argument('module', type=str)
    args = parser.parse_args(argv)
    sys.path.append('.')
    importlib.import_module(args.module)
    result = VerificationSuit().run()
    print(result.report())
    return int(result.has_failed())
示例#2
0
def _webapp_health_monitor(argv):
    parser = argparse.ArgumentParser()
    parser.add_argument('module', type=str)
    parser.add_argument('--tag', type=str, default=[], action='append', dest='tags')
    args = parser.parse_args(argv)
    sys.path.append('.')
    importlib.import_module(args.module)
    result = VerificationSuit(args.tags).run()
    sys.stdout.write('{}\n'.format(result.report()))
    return int(result.has_failed())
示例#3
0
 def handle(self, *args, **options):
     submodules = self._get_verificator_modules()
     for submodule in submodules:
         try:
             importlib.import_module(submodule)
         except ImportError as e:
             if str(e) != "No module named '{}'".format(submodule):
                 raise e
     result = VerificationSuit().run()
     print(result.report())
 def handle(self, tags, **kwargs):
     submodules = self._get_verificator_modules()
     for submodule in submodules:
         try:
             importlib.import_module(submodule)
         except ImportError as e:
             if not self._import_error_concerns_verificator(submodule, e):
                 raise e
     result = VerificationSuit(tags).run()
     self.stdout.write('{}\n'.format(result.report()))
     sys.exit(result.has_failed())
 def handle(self, tags, **kwargs):
     submodules = self._get_verificator_modules()
     for submodule in submodules:
         try:
             importlib.import_module(submodule)
         except ImportError as e:
             if not self._import_error_concerns_verificator(submodule, e):
                 raise e
     result = VerificationSuit(tags).run()
     self.stdout.write('{}\n'.format(result.report()))
     sys.exit(result.has_failed())
def _webapp_health_monitor(argv):
    parser = argparse.ArgumentParser()
    parser.add_argument('module', type=str)
    parser.add_argument('--tag',
                        type=str,
                        default=[],
                        action='append',
                        dest='tags')
    args = parser.parse_args(argv)
    sys.path.append('.')
    importlib.import_module(args.module)
    result = VerificationSuit(args.tags).run()
    sys.stdout.write('{}\n'.format(result.report()))
    return int(result.has_failed())