Skip to content

Commit 4ef9906

Browse files
committed
Add is_radas_enabled unified method to check radas enablement
1 parent 947f23c commit 4ef9906

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

charon/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ def get_detach_signature_command(self) -> str:
158158
def is_aws_cf_enable(self) -> bool:
159159
return self.__aws_cf_enable
160160

161+
def is_radas_enabled(self) -> bool:
162+
return bool(self.__radas_config__ and self.__radas_config__.validate())
163+
161164
def get_radas_config(self) -> Optional[RadasConfig]:
162165
return self.__radas_config__
163166

charon/pkgs/maven.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,7 @@ def handle_maven_uploading(
416416
if not conf:
417417
sys.exit(1)
418418

419-
rconf = conf.get_radas_config()
420-
if rconf and rconf.validate():
419+
if conf.is_radas_enabled():
421420
logger.info("Start generating radas signature files for s3 bucket %s\n", bucket_name)
422421
(_failed_metas, _generated_signs) = radas_signature.generate_radas_sign(
423422
top_level=top_level, sign_result_loc=sign_result_loc

0 commit comments

Comments
 (0)