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):
553553
554554 def _parse_upload_error (self , error : rfapi .UploadError ) -> str :
555555 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" )
556559 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" )
560560 temp_str = dict_part .replace (r"\'" , "<PLACEHOLDER>" )
561561 temp_str = temp_str .replace ('"' , r"\"" )
562562 temp_str = temp_str .replace ("'" , '"' )
563563 dict_part = temp_str .replace ("<PLACEHOLDER>" , "'" )
564-
565564 parsed_dict : dict = json .loads (dict_part )
566565 message = parsed_dict .get ("message" )
567566 return message or str (parsed_dict )
You can’t perform that action at this time.
0 commit comments