From dc52956c28d7b112cc4711994ad35a23bb939259 Mon Sep 17 00:00:00 2001 From: ichuang Date: Fri, 24 Aug 2012 14:09:57 -0400 Subject: [PATCH] don't list all users if too many --- .../management/commands/manage_course_groups.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lms/djangoapps/lms_migration/management/commands/manage_course_groups.py b/lms/djangoapps/lms_migration/management/commands/manage_course_groups.py index 0043b483e0..f3a39db5ca 100644 --- a/lms/djangoapps/lms_migration/management/commands/manage_course_groups.py +++ b/lms/djangoapps/lms_migration/management/commands/manage_course_groups.py @@ -36,9 +36,14 @@ class Command(BaseCommand): # users in group uall = User.objects.all() - print "----" - print "List of All Users: %s" % [str(x.username) for x in uall] - print "----" + if uall.count()<50: + print "----" + print "List of All Users: %s" % [str(x.username) for x in uall] + print "----" + else: + print "----" + print "There are %d users, which is too many to list" % uall.count() + print "----" while True: