Skip to content
Snippets Groups Projects
Commit 56f01ce0 authored by Alexander Kryklia's avatar Alexander Kryklia
Browse files

Improve code.

parent 32138d35
No related branches found
No related tags found
No related merge requests found
......@@ -142,7 +142,7 @@ class LTIModule(LTIFields, XModule):
try:
lti_id, key, secret = lti_passport.split(':')
except ValueError:
raise Exception('Could not parse LTI passport: {0}. \
raise Exception('Could not parse LTI passport: {0!r}. \
Should be "id:key:secret" string.'.format(lti_passport))
if lti_id == self.lti_id:
client_key, client_secret = key, secret
......@@ -154,7 +154,7 @@ class LTIModule(LTIFields, XModule):
try:
param_name, param_value = custom_parameter.split('=', 1)
except ValueError:
raise Exception('Could not parse custom parameter: {0}. \
raise Exception('Could not parse custom parameter: {0!r}. \
Should be "x=y" string.'.format(custom_parameter))
# LTI specs: 'custom_' should be prepended before each custom parameter
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment