Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
Upgrade to Juniper (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
zherebkin authored Oct 22, 2020
1 parent 4f7fb73 commit 43a4325
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scormxblock/scormxblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

from xblock.core import XBlock
from xblock.fields import Scope, String, Float, Boolean, Dict, DateTime, Integer
from xblock.fragment import Fragment
from xblockutils.resources import ResourceLoader
from web_fragments.fragment import Fragment


# Make '_' a no-op so we can scrape strings
Expand Down Expand Up @@ -191,7 +191,7 @@ def studio_submit(self, request, suffix=''):

self.set_fields_xblock(path_to_file)

return Response(json.dumps({'result': 'success'}), content_type='application/json')
return Response(json.dumps({'result': 'success'}), content_type='application/json', charset="utf8")

@XBlock.json_handler
def scorm_get_value(self, data, suffix=''):
Expand Down Expand Up @@ -345,7 +345,7 @@ def get_sha1(self, file_descriptor):
"""
block_size = 8 * 1024
sha1 = hashlib.sha1()
for block in iter(partial(file_descriptor.read, block_size), ''):
for block in iter(partial(file_descriptor.read, block_size), b''):
sha1.update(block)
file_descriptor.seek(0)
return sha1.hexdigest()
Expand Down

0 comments on commit 43a4325

Please sign in to comment.