Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
37befe5c
Commit
37befe5c
authored
Aug 02, 2012
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make clean_xml script work with stringified errors
parent
217fdc4d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
lms/djangoapps/courseware/management/commands/clean_xml.py
+2
-6
No files found.
lms/djangoapps/courseware/management/commands/clean_xml.py
View file @
37befe5c
...
@@ -61,11 +61,7 @@ def import_with_checks(course_dir, verbose=True):
...
@@ -61,11 +61,7 @@ def import_with_checks(course_dir, verbose=True):
course_dirs
=
course_dirs
)
course_dirs
=
course_dirs
)
def
str_of_err
(
tpl
):
def
str_of_err
(
tpl
):
(
msg
,
exc_info
)
=
tpl
(
msg
,
exc_str
)
=
tpl
if
exc_info
is
None
:
return
msg
exc_str
=
'
\n
'
.
join
(
traceback
.
format_exception
(
*
exc_info
))
return
'{msg}
\n
{exc}'
.
format
(
msg
=
msg
,
exc
=
exc_str
)
return
'{msg}
\n
{exc}'
.
format
(
msg
=
msg
,
exc
=
exc_str
)
courses
=
modulestore
.
get_courses
()
courses
=
modulestore
.
get_courses
()
...
@@ -83,7 +79,7 @@ def import_with_checks(course_dir, verbose=True):
...
@@ -83,7 +79,7 @@ def import_with_checks(course_dir, verbose=True):
print
'
\n
'
print
'
\n
'
print
"="
*
40
print
"="
*
40
print
'ERRORs during import:'
print
'ERRORs during import:'
print
'
\n
'
.
join
(
map
(
str_of_err
,
errors
))
print
'
\n
'
.
join
(
map
(
str_of_err
,
errors
))
print
"="
*
40
print
"="
*
40
print
'
\n
'
print
'
\n
'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment