Browse files

fix indexing courses to list chapters

  • Loading branch information...
1 parent 23c7427 commit f7ff3cc330d0cb96c1bd1cb83cd4bdd1e66f09e9 @nettoyeur nettoyeur committed Dec 28, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 edu_10gen.py
View
4 edu_10gen.py
@@ -109,8 +109,8 @@ def list_courses(self):
def list_chapters(self, course_i):
self.paragraphs = []
- if course_i <= len(self.courses) and course_i >= 0:
- course = self.courses[course_i - 1]
+ if course_i < len(self.courses) and course_i >= 0:
+ course = self.courses[course_i]
course_name = course['name']
courseware = self._br.open(SITE_URL+course['url'])
courseware_soup = BeautifulSoup(courseware.read())

0 comments on commit f7ff3cc

Please sign in to comment.