Skip to content

Commit

Permalink
fix indexing courses to list chapters
Browse files Browse the repository at this point in the history
  • Loading branch information
nettoyeur committed Dec 28, 2012
1 parent 23c7427 commit f7ff3cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions edu_10gen.py
Expand Up @@ -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())
Expand Down

0 comments on commit f7ff3cc

Please sign in to comment.