Skip to content
Snippets Groups Projects
Commit f90be003 authored by Calen Pennington's avatar Calen Pennington Committed by Emma Green
Browse files

Don't sys.exit in management commands, in case they get called from other code

parent 7db7f9cc
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ import sys
from django.contrib.auth import get_user_model
from django.contrib.sites.models import Site
from django.core.cache import cache
from django.core.management import BaseCommand
from django.core.management import BaseCommand, CommandError
from openedx.core.djangoapps.catalog.cache import (
PATHWAY_CACHE_KEY_TPL,
......@@ -93,7 +93,7 @@ class Command(BaseCommand):
if failure:
# This will fail a Jenkins job running this command, letting site
# operators know that there was a problem.
sys.exit(1)
raise CommandError("Caching program information failed")
def get_site_program_uuids(self, client, site):
failure = False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment