From de5d91217f5029234182d8057f671c2605f561e0 Mon Sep 17 00:00:00 2001 From: Vasily Kleschov Date: Wed, 14 Sep 2022 19:28:45 +0300 Subject: [PATCH] Fixed review comments --- cas_wrapper.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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)