INNER CODE UNIT · Python

Driver

usnistgov/OSCAL · src/specifications/profile-resolution/spec-tester.py:100

class Driver(object):
    """Handles running the profile resolver given a source file and destination path"""

    def __init__(self, command: str, workdir: Optional[str] = None,
                 logger: Optional[logging.Logger] = None) -> None:
        """
        Note: Creates a temporary directory as a side effect, consumer must call .cleanup() to remove
        """
        if not DRIVER_SOURCE_TOKEN in command:
            raise Exception(
                f"Command `{command}` does not contain source token '{DRIVER_SOURCE_TOKEN}'")
        if not DRIVER_DESTINATION_TOKEN in command:
            raise Exception(
                f"Command `{command}` does not contain source token '{DRIVER_DESTINATION_TOKEN}'")

        self.logger = logger if logger is not None else logging.getLogger(
            __name__)
        self.command = command

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…