Fix runtime error where dict is modified during iteration.
This commit is contained in:
@@ -1153,7 +1153,7 @@ class CourseDescriptor(CourseFields, SequenceDescriptor, LicenseMixin):
|
||||
|
||||
# bleh, have to parse the XML here to just pull out the url_name attribute
|
||||
# I don't think it's stored anywhere in the instance.
|
||||
course_file = BytesIO(xml_data.encode('ascii', 'ignore'))
|
||||
course_file = BytesIO(six.binary_type(xml_data))
|
||||
xml_obj = etree.parse(course_file, parser=edx_xml_parser).getroot()
|
||||
|
||||
policy_dir = None
|
||||
|
||||
@@ -110,7 +110,7 @@ class XmlImportFactory(Factory):
|
||||
if inline_xml:
|
||||
kwargs['xml_node'].set('not_a_pointer', 'true')
|
||||
|
||||
for key in kwargs.keys():
|
||||
for key in list(kwargs.keys()):
|
||||
if key not in XML_IMPORT_ARGS:
|
||||
kwargs['xml_node'].set(key, kwargs.pop(key))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user