MCPcopy Create free account
hub / github.com/airbnb/binaryalert / run

Method run

cli/manager.py:49–65  ·  view source on GitHub ↗

Execute one of the available commands. Args: command: Command in self.commands.

(self, command: str)

Source from the content-addressed store, hash-verified

47 )
48
49 def run(self, command: str) -> None:
50 """Execute one of the available commands.
51
52 Args:
53 command: Command in self.commands.
54 """
55 boto3.setup_default_session(region_name=self._config.aws_region)
56
57 # Validate the configuration.
58 try:
59 if command not in {'clone_rules', 'compile_rules', 'configure', 'unit_test'}:
60 self._config.validate()
61 getattr(self, command)() # Command validation already happened in the ArgumentParser.
62 except InvalidConfigError as error:
63 sys.exit('ERROR: {}\nPlease run "python3 manage.py configure"'.format(error))
64 except TestFailureError as error:
65 sys.exit('TEST FAILED: {}'.format(error))
66
67 @staticmethod
68 def _enqueue(

Callers 3

mainFunction · 0.95
live_testMethod · 0.45
unit_testMethod · 0.45

Calls 1

validateMethod · 0.80

Tested by

no test coverage detected