Commit 2fde7f4c by Calen Pennington

Minor fixes from pull request 131

parent 6f5e54b9
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
import logging import logging
log = logging.getLogger("mitx.common.lib.mitxmako") log = logging.getLogger("mitx." + __name__)
from django.template import Context from django.template import Context
from django.http import HttpResponse from django.http import HttpResponse
......
...@@ -223,7 +223,7 @@ def get_module(tree, module, id_tag, module_id, sections_dirname, options): ...@@ -223,7 +223,7 @@ def get_module(tree, module, id_tag, module_id, sections_dirname, options):
result_set = tree.xpath(xpath_search) result_set = tree.xpath(xpath_search)
if len(result_set) < 1: if len(result_set) < 1:
# Not found in main tree. Let's look in the section files. # Not found in main tree. Let's look in the section files.
section_list = (s[:-4] for s in os.listdir(sections_dirname) if s[-4:]=='.xml') section_list = (s[:-4] for s in os.listdir(sections_dirname) if s.endswith('.xml'))
for section in section_list: for section in section_list:
try: try:
s = get_section(section, options, sections_dirname) s = get_section(section, options, sections_dirname)
......
...@@ -15,7 +15,7 @@ middleware.MakoMiddleware() ...@@ -15,7 +15,7 @@ middleware.MakoMiddleware()
def check_names(user, course): def check_names(user, course):
''' '''
Complain if any problems have alphanumeric names. Complain if any problems have non alphanumeric names.
TODO (vshnayder): there are some in 6.002x that don't. Is that actually a problem? TODO (vshnayder): there are some in 6.002x that don't. Is that actually a problem?
''' '''
all_ok = True all_ok = True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment