diff options
| author | Adam Janovsky | 2021-05-14 14:53:53 +0200 |
|---|---|---|
| committer | Adam Janovsky | 2021-05-14 14:53:53 +0200 |
| commit | c019ccb5c0831bc9047a2ed36b4f9d1d3c6bd4bc (patch) | |
| tree | 1d71dcfd03144d0ed2af1886d6fed3118b91f226 /cc_cli.py | |
| parent | b1dcb367392a0e0ef767e05f4132548556a6ae54 (diff) | |
| download | sec-certs-c019ccb5c0831bc9047a2ed36b4f9d1d3c6bd4bc.tar.gz sec-certs-c019ccb5c0831bc9047a2ed36b4f9d1d3c6bd4bc.tar.zst sec-certs-c019ccb5c0831bc9047a2ed36b4f9d1d3c6bd4bc.zip | |
adds maintenances action to cli
Diffstat (limited to 'cc_cli.py')
| -rw-r--r-- | cc_cli.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -13,7 +13,7 @@ logger = logging.getLogger(__name__) @click.command() -@click.argument('actions', required=True, nargs=-1, type=click.Choice(['all', 'build', 'download', 'convert', 'analyze'], case_sensitive=False)) +@click.argument('actions', required=True, nargs=-1, type=click.Choice(['all', 'build', 'download', 'convert', 'analyze', 'maintenances'], case_sensitive=False)) @click.option('-o', '--output', type=click.Path(file_okay=False, dir_okay=True, writable=True, readable=True), help='Path where the output of the experiment will be stored. May overwrite existing content.') @click.option('-c', '--config', 'configpath', default=None, type=click.Path(file_okay=True, dir_okay=False, writable=True, readable=True), @@ -92,6 +92,11 @@ def main(configpath: Optional[str], actions: List[str], inputpath: Optional[Path dset.extract_data() dset.compute_heuristics() + if 'maintenances' in actions: + if not dset.state.meta_sources_parsed: + print('Error: You want to process maintenance updates, but the data from commoncriteria.org was not parsed. You must use \'build\' action first.') + sys.exit(1) + end = datetime.now() logger.info(f'The computation took {(end-start)} seconds.') |
