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
3355f804
Commit
3355f804
authored
Jul 02, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add logging of filename when module file parsing fails
parent
e172be3a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
+11
-1
cms/envs/dev.py
+4
-0
common/lib/xmodule/xmodule/xml_module.py
+7
-1
No files found.
cms/envs/dev.py
View file @
3355f804
...
...
@@ -3,6 +3,10 @@ This config file runs the simplest dev environment"""
from
.common
import
*
import
logging
import
sys
logging
.
basicConfig
(
stream
=
sys
.
stdout
,
)
DEBUG
=
True
TEMPLATE_DEBUG
=
DEBUG
...
...
common/lib/xmodule/xmodule/xml_module.py
View file @
3355f804
...
...
@@ -2,7 +2,9 @@ from collections import MutableMapping
from
xmodule.x_module
import
XModuleDescriptor
from
lxml
import
etree
import
copy
import
logging
log
=
logging
.
getLogger
(
__name__
)
class
LazyLoadingDict
(
MutableMapping
):
"""
...
...
@@ -124,7 +126,11 @@ class XmlDescriptor(XModuleDescriptor):
else
:
filepath
=
cls
.
_format_filepath
(
xml_object
.
tag
,
filename
)
with
system
.
resources_fs
.
open
(
filepath
)
as
file
:
definition_xml
=
etree
.
parse
(
file
)
.
getroot
()
try
:
definition_xml
=
etree
.
parse
(
file
)
.
getroot
()
except
:
log
.
exception
(
"Failed to parse xml in file
%
s"
%
filepath
)
raise
cls
.
clean_metadata_from_xml
(
definition_xml
)
return
cls
.
definition_from_xml
(
definition_xml
,
system
)
...
...
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