Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
0b2069c6
Commit
0b2069c6
authored
12 years ago
by
Victor Shnayder
Browse files
Options
Downloads
Patches
Plain Diff
make clean_xml script work with stringified errors
parent
b46172da
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lms/djangoapps/courseware/management/commands/clean_xml.py
+2
-6
2 additions, 6 deletions
lms/djangoapps/courseware/management/commands/clean_xml.py
with
2 additions
and
6 deletions
lms/djangoapps/courseware/management/commands/clean_xml.py
+
2
−
6
View file @
0b2069c6
...
...
@@ -61,11 +61,7 @@ def import_with_checks(course_dir, verbose=True):
course_dirs
=
course_dirs
)
def
str_of_err
(
tpl
):
(
msg
,
exc_info
)
=
tpl
if
exc_info
is
None
:
return
msg
exc_str
=
'
\n
'
.
join
(
traceback
.
format_exception
(
*
exc_info
))
(
msg
,
exc_str
)
=
tpl
return
'
{msg}
\n
{exc}
'
.
format
(
msg
=
msg
,
exc
=
exc_str
)
courses
=
modulestore
.
get_courses
()
...
...
@@ -83,7 +79,7 @@ def import_with_checks(course_dir, verbose=True):
print
'
\n
'
print
"
=
"
*
40
print
'
ERRORs during import:
'
print
'
\n
'
.
join
(
map
(
str_of_err
,
errors
))
print
'
\n
'
.
join
(
map
(
str_of_err
,
errors
))
print
"
=
"
*
40
print
'
\n
'
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment