@@ -505,7 +505,7 @@ def HandleRequest(self, request, response):
505505
506506 try :
507507 json_data = self .GetJson (request , response )
508- response .AppendData (json .dumps (json_data , sort_keys = True ))
508+ response .AppendData (json .dumps (json_data , sort_keys = True ). encode () )
509509 except ServerException as e :
510510 # For JSON requests, rather than returning 500s we return the error as
511511 # JSON
@@ -514,7 +514,7 @@ def HandleRequest(self, request, response):
514514 'status' : False ,
515515 'error' : str (e ),
516516 }
517- response .AppendData (json .dumps (json_data , sort_keys = True ))
517+ response .AppendData (json .dumps (json_data , sort_keys = True ). encode () )
518518
519519 def RaiseExceptionIfMissing (self , request , param ):
520520 """Helper method to raise an exception if the param is missing."""
@@ -545,7 +545,7 @@ def HandleRequest(self, request, response):
545545 'status' : False ,
546546 'error' : 'The OLA Server instance is no longer running' ,
547547 }
548- response .AppendData (json .dumps (json_data , sort_keys = True ))
548+ response .AppendData (json .dumps (json_data , sort_keys = True ). encode () )
549549
550550
551551class TestDefinitionsHandler (JsonRequestHandler ):
0 commit comments