File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,14 +102,17 @@ def deploy(
102102 if properties is not None :
103103 properties_param_str = ";" .join (f"{ k } ={ value } " for k , values in properties .items () for value in values )
104104 route = ";" .join (s for s in [artifact_folder .as_posix (), properties_param_str ] if s )
105- artifact_check_sums = Checksums .generate (local_file )
106- headers = {
107- "X-Checksum-Sha1" : artifact_check_sums .sha1 ,
108- "X-Checksum-Sha256" : artifact_check_sums .sha256 ,
109- "X-Checksum" : artifact_check_sums .md5 ,
110- }
105+ headers : Dict [str , str ] = {}
111106 if checksum_enabled :
112- headers ["X-Checksum-Deploy" ] = "true"
107+ artifact_check_sums = Checksums .generate (local_file )
108+ headers .update (
109+ {
110+ "X-Checksum-Sha1" : artifact_check_sums .sha1 ,
111+ "X-Checksum-Sha256" : artifact_check_sums .sha256 ,
112+ "X-Checksum" : artifact_check_sums .md5 ,
113+ "X-Checksum-Deploy" : "true" ,
114+ },
115+ )
113116 try :
114117 self ._put (
115118 route = route ,
You can’t perform that action at this time.
0 commit comments