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
73113edd
Commit
73113edd
authored
Apr 04, 2013
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix xml_attributes inspection
parent
c0fc029b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
cms/djangoapps/contentstore/management/commands/check_course.py
+4
-3
No files found.
cms/djangoapps/contentstore/management/commands/check_course.py
View file @
73113edd
...
...
@@ -38,9 +38,10 @@ class Command(BaseCommand):
# we've had a bug where the xml_attributes field can we rewritten as a string rather than a dict
def
_check_xml_attributes_field
(
module
):
err_cnt
=
0
if
hasattr
(
module
,
'xml_attributes'
)
and
(
isinstance
(
module
,
str
)
or
isinstance
(
module
,
unicode
)):
print
'module = {0} has xml_attributes as a string. It should be a dict'
.
format
(
module
.
location
.
url
())
err_cnt
=
err_cnt
+
1
if
hasattr
(
module
,
'xml_attributes'
):
if
isinstance
(
module
.
xml_attributes
,
str
)
or
isinstance
(
module
.
xml_attributes
,
unicode
):
print
'module = {0} has xml_attributes as a string. It should be a dict'
.
format
(
module
.
location
.
url
())
err_cnt
=
err_cnt
+
1
for
child
in
module
.
get_children
():
err_cnt
=
err_cnt
+
_check_xml_attributes_field
(
child
)
return
err_cnt
...
...
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