Compare commits
No commits in common. "211d4521c031f80a215e737485a71e5ca71a7620" and "49c4c97645131c263c9b4b0193c3641b3755d656" have entirely different histories.
211d4521c0
...
49c4c97645
@ -79,30 +79,6 @@ class CasWrapper:
|
|||||||
result_of_execution = command()
|
result_of_execution = command()
|
||||||
return json.loads(result_of_execution)['hash']
|
return json.loads(result_of_execution)['hash']
|
||||||
|
|
||||||
def notarize_no_exc(
|
|
||||||
self,
|
|
||||||
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)
|
|
||||||
success = True
|
|
||||||
except Exception:
|
|
||||||
self._logger.exception('Cannot notarize artifact: %s',
|
|
||||||
local_path)
|
|
||||||
cas_hash = ''
|
|
||||||
return success, cas_hash
|
|
||||||
|
|
||||||
def authenticate(
|
def authenticate(
|
||||||
self,
|
self,
|
||||||
local_path: str,
|
local_path: str,
|
||||||
|
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import setup
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="cas_wrapper",
|
name="cas_wrapper",
|
||||||
version="0.0.5",
|
version="0.0.4",
|
||||||
author="Stepan Oksanichenko",
|
author="Stepan Oksanichenko",
|
||||||
author_email="soksanichenko@almalinux.org",
|
author_email="soksanichenko@almalinux.org",
|
||||||
description="The python wrapper around binary cas from "
|
description="The python wrapper around binary cas from "
|
||||||
|
Loading…
Reference in New Issue
Block a user