Compare commits

..

No commits in common. "d9c09a5d58a64e51965be6cc14628806bf5f4271" and "211d4521c031f80a215e737485a71e5ca71a7620" have entirely different histories.

2 changed files with 2 additions and 12 deletions

View File

@ -108,7 +108,6 @@ class CasWrapper:
local_path: str,
return_json: bool = False,
use_hash: bool = False,
signer_id: str = None,
):
"""
Wrapper around `cas authenticate`
@ -124,8 +123,6 @@ class CasWrapper:
command_args = ['authenticate', local_path]
if use_hash:
command_args = ['authenticate', '--hash', local_path]
if signer_id:
command_args.extend(('--signerID', signer_id))
command_args.extend(('-o', 'json'))
command = self._cas[command_args]
try:
@ -149,7 +146,6 @@ class CasWrapper:
def authenticate_source(
self,
local_path: str,
signer_id: str = None,
) -> typing.Tuple[bool, typing.Optional[str]]:
"""
Authenticates source by git path.
@ -159,11 +155,7 @@ class CasWrapper:
commit_cas_hash = None
self.ensure_login()
try:
result_json = self.authenticate(
local_path,
return_json=True,
signer_id=signer_id
)
result_json = self.authenticate(local_path, return_json=True)
is_authenticated = result_json['verified']
commit_cas_hash = result_json['hash']
# we can fall with ProcessExecutionError,
@ -176,7 +168,6 @@ class CasWrapper:
self,
local_path: str,
use_hash: bool = False,
signer_id: str = None,
) -> bool:
"""
Authenticates artifact by artifact path or hash if `use_hash` is True.
@ -189,7 +180,6 @@ class CasWrapper:
local_path,
use_hash=use_hash,
return_json=True,
signer_id=signer_id
)['verified']
# we can fall with ProcessExecutionError,
# because artifact can be not notarized

View File

@ -2,7 +2,7 @@ from setuptools import setup
setup(
name="cas_wrapper",
version="0.0.6",
version="0.0.5",
author="Stepan Oksanichenko",
author_email="soksanichenko@almalinux.org",
description="The python wrapper around binary cas from "