isinstance instead of type

This commit is contained in:
ichuang
2012-08-06 14:10:00 -04:00
parent a46a37d1c0
commit 3484f5382c

View File

@@ -120,7 +120,7 @@ def course_staff_group_name(course):
'''
course should be either a CourseDescriptor instance, or a string (the .course entry of a Location)
'''
if type(course)==str:
if isinstance(course,str):
coursename = course
else:
coursename = course.metadata.get('data_dir','UnknownCourseName')