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