From 2fde7f4c6d7d18f36cee610b3fa761140564781d Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Thu, 28 Jun 2012 08:39:12 -0400 Subject: [PATCH] Minor fixes from pull request 131 --- common/lib/mitxmako/shortcuts.py | 2 +- lms/djangoapps/courseware/content_parser.py | 2 +- lms/djangoapps/courseware/management/commands/check_course.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/lib/mitxmako/shortcuts.py b/common/lib/mitxmako/shortcuts.py index 72a9b81e3c..c601d93260 100644 --- a/common/lib/mitxmako/shortcuts.py +++ b/common/lib/mitxmako/shortcuts.py @@ -14,7 +14,7 @@ import logging -log = logging.getLogger("mitx.common.lib.mitxmako") +log = logging.getLogger("mitx." + __name__) from django.template import Context from django.http import HttpResponse diff --git a/lms/djangoapps/courseware/content_parser.py b/lms/djangoapps/courseware/content_parser.py index 62163c86b0..95c3afed8c 100644 --- a/lms/djangoapps/courseware/content_parser.py +++ b/lms/djangoapps/courseware/content_parser.py @@ -223,7 +223,7 @@ def get_module(tree, module, id_tag, module_id, sections_dirname, options): result_set = tree.xpath(xpath_search) if len(result_set) < 1: # 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: try: s = get_section(section, options, sections_dirname) diff --git a/lms/djangoapps/courseware/management/commands/check_course.py b/lms/djangoapps/courseware/management/commands/check_course.py index 8de29bdd8b..8af0c5d4be 100644 --- a/lms/djangoapps/courseware/management/commands/check_course.py +++ b/lms/djangoapps/courseware/management/commands/check_course.py @@ -15,7 +15,7 @@ middleware.MakoMiddleware() 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? ''' all_ok = True