@classmethod
    def from_path(cls, path):
        try:
            keypair, certificate = load_certificate_from_path(
                path, AUTHORITY_KEY_FILENAME, AUTHORITY_CERTIFICATE_FILENAME
            )
        except PathError as e:
            # Re-raise, but with a more specific message.
            error = b"Unable to load certificate authority file."
            if e.code == 2:
                error = error + (b" Please run `flocker-ca initialize` to "
                                 b"generate a new certificate authority.")
            raise PathError(error, e.filename, e.code, e.failure)
        credential = FlockerCredential(
            path=path, keypair=keypair, certificate=certificate)
        return cls(credential=credential)
dataset/ETHPy150Open ClusterHQ/flocker/flocker/ca/_ca.py/RootCredential.from_path/original