Skip to content

Commit

Permalink
Merge pull request fossology#16 from leimaohui/master
Browse files Browse the repository at this point in the history
Fix error for python3.5.
  • Loading branch information
swinslow authored Aug 2, 2019
2 parents b950917 + 135c24f commit a53a4d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fossdriver/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def parseAnchorTagsForNewUploadNumber(content):

def decodeAjaxShowJobsData(content):
"""Extract and decode the raw ajaxShowJobs data."""
rj = json.loads(content)
rj = json.loads(content.decode('utf-8'))
s1 = rj["showJobsData"]
# this is current a string that has unicode-escaped data.
# we want to convert it to a bytes object, then re-convert it back
Expand Down Expand Up @@ -187,7 +187,7 @@ def parseDecodedAjaxShowJobsData(content):

def parseSingleJobData(content):
"""Parse the JSON data returned from status call for a single job."""
rj = json.loads(content)
rj = json.loads(content.decode('utf-8'))
jobArr = rj.get("aaData", None)
if jobArr is None:
return None
Expand Down
2 changes: 1 addition & 1 deletion fossdriver/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _getUploadData(self, folderNum, uploadName, exact=True):
# FIXME iTotalDisplayRecords and loop to get more if needed
endpoint = "/repo/?mod=browse-processPost&folder={}&iDisplayStart=0&iDisplayLength=100".format(folderNum)
results = self._get(endpoint)
rj = json.loads(results.content)
rj = json.loads(results.content.decode('utf-8'))
uploadData = rj.get("aaData", None)
if uploadData is None:
return None
Expand Down

0 comments on commit a53a4d2

Please sign in to comment.