File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -554,13 +554,14 @@ def _annotation_params(self, annotation_path):
554
554
def _parse_upload_error (self , error : rfapi .UploadError ) -> str :
555
555
dict_part = str (error ).split (": " , 2 )[2 ]
556
556
if re .search (r"'\w+':" , dict_part ):
557
+ dict_part = dict_part .replace ("True" , "true" )
558
+ dict_part = dict_part .replace ("False" , "false" )
559
+ dict_part = dict_part .replace ("None" , "null" )
557
560
temp_str = dict_part .replace (r"\'" , "<PLACEHOLDER>" )
558
561
temp_str = temp_str .replace ('"' , r"\"" )
559
562
temp_str = temp_str .replace ("'" , '"' )
560
563
dict_part = temp_str .replace ("<PLACEHOLDER>" , "'" )
561
- dict_part = dict_part .replace ("True" , "true" )
562
- dict_part = dict_part .replace ("False" , "false" )
563
- dict_part = dict_part .replace ("None" , "null" )
564
+
564
565
parsed_dict : dict = json .loads (dict_part )
565
566
message = parsed_dict .get ("message" )
566
567
return message or str (parsed_dict )
You can’t perform that action at this time.
0 commit comments