Fixed review comments

This commit is contained in:
Vasily Kleschov 2022-09-14 19:28:45 +03:00
parent 7093f13a10
commit de5d91217f

View File

@ -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)