Fix the rest of these.
This commit is contained in:
@@ -258,7 +258,7 @@ class InputTypeBase(object):
|
||||
msg = u"Error in xml '{x}': {err} ".format(
|
||||
x=etree.tostring(xml), err=text_type(err))
|
||||
msg = Exception(msg)
|
||||
six.reraise(Exception, msg, sys.exc_info()[2])
|
||||
six.reraise(Exception, Exception(msg), sys.exc_info()[2])
|
||||
|
||||
@classmethod
|
||||
def get_attributes(cls):
|
||||
|
||||
@@ -294,7 +294,7 @@ class CapaMixin(ScorableXBlockMixin, CapaFields):
|
||||
except Exception as err: # pylint: disable=broad-except
|
||||
msg = u'cannot create LoncapaProblem {loc}: {err}'.format(
|
||||
loc=text_type(self.location), err=err)
|
||||
six.reraise(Exception(msg), None, sys.exc_info()[2])
|
||||
six.reraise(Exception, Exception(msg), sys.exc_info()[2])
|
||||
|
||||
if self.score is None:
|
||||
self.set_score(self.score_from_lcp(lcp))
|
||||
|
||||
@@ -200,7 +200,7 @@ class ProblemBlock(
|
||||
self.scope_ids.user_id
|
||||
)
|
||||
_, _, traceback_obj = sys.exc_info() # pylint: disable=redefined-outer-name
|
||||
six.reraise(ProcessingError(generic_error_message), None, traceback_obj)
|
||||
six.reraise(ProcessingError, ProcessingError(generic_error_message), traceback_obj)
|
||||
|
||||
after = self.get_progress()
|
||||
after_attempts = self.attempts
|
||||
|
||||
@@ -193,7 +193,7 @@ def grader_from_conf(conf):
|
||||
msg = ("Unable to parse grader configuration:\n " +
|
||||
str(subgraderconf) +
|
||||
"\n Error was:\n " + str(error))
|
||||
six.reraise(ValueError(msg), None, sys.exc_info()[2])
|
||||
six.reraise(ValueError, ValueError(msg), sys.exc_info()[2])
|
||||
|
||||
return WeightedSubsectionsGrader(subgraders)
|
||||
|
||||
|
||||
@@ -291,7 +291,7 @@ class HtmlBlock(
|
||||
msg = 'Unable to load file contents at path {0}: {1} '.format(
|
||||
filepath, err)
|
||||
# add more info and re-raise
|
||||
six.reraise(Exception(msg), None, sys.exc_info()[2])
|
||||
six.reraise(Exception, Exception(msg), sys.exc_info()[2])
|
||||
|
||||
@classmethod
|
||||
def parse_xml_new_runtime(cls, node, runtime, keys):
|
||||
|
||||
Reference in New Issue
Block a user