Skip to content

Instantly share code, notes, and snippets.

@andymckay
Created January 17, 2012 01:08
Show Gist options
  • Save andymckay/1623943 to your computer and use it in GitHub Desktop.
Save andymckay/1623943 to your computer and use it in GitHub Desktop.
~/sandboxes/zamboni/vendor/src/django((40e28df...)) $ gd
diff --git a/django/core/management/base.py b/django/core/management/base.py
index 6b9ce6e..b7a853a 100644
--- a/django/core/management/base.py
+++ b/django/core/management/base.py
@@ -210,6 +210,7 @@ class BaseCommand(object):
except ImportError, e:
# If settings should be available, but aren't,
# raise the error and quit.
+ raise
sys.stderr.write(smart_str(self.style.ERROR('Error: %s\n' % e)))
sys.exit(1)
try:
@@ -230,6 +231,7 @@ class BaseCommand(object):
if self.output_transaction:
self.stdout.write('\n' + self.style.SQL_KEYWORD("COMMIT;") + '\n')
except CommandError, e:
+ raise
self.stderr.write(smart_str(self.style.ERROR('Error: %s\n' % e)))
sys.exit(1)
diff --git a/django/core/management/commands/runserver.py b/django/core/management/commands/runserver.py
index b265740..39d7bd7 100644
--- a/django/core/management/commands/runserver.py
+++ b/django/core/management/commands/runserver.py
@@ -116,6 +116,7 @@ class BaseRunserverCommand(BaseCommand):
error_text = ERRORS[e.args[0].args[0]]
except (AttributeError, KeyError):
error_text = str(e)
+ raise
sys.stderr.write(self.style.ERROR("Error: %s" % error_text) + '\n')
# Need to use an OS exit because sys.exit doesn't work in a thread
os._exit(1)
~/sandboxes/zamboni/vendo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment