diff --git a/cas_wrapper.py b/cas_wrapper.py index e2f7baf..8e7b26a 100644 --- a/cas_wrapper.py +++ b/cas_wrapper.py @@ -84,6 +84,15 @@ class CasWrapper: local_path: str, metadata: typing.Dict = None, ) -> typing.Tuple[bool, str]: + """ + Wrapper for avoiding raising exceptions during notarization. + Return `success` flag instead for library user to react respectively. + :param local_path: path to a local Git repo + :param metadata: additional metadata + :return: boolean flag for operation success and the hash + of the notarized artifact. + :rtype: tuple + """ success = False try: cas_hash = self.notarize(local_path, metadata=metadata)