Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Translation patch for executing commands from tests

  • Loading branch information...
commit 05b169600655864b1499f4c6903374a5902b5d35 1 parent bd514f2
Andrii Kostenko gugu authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 django/core/management/base.py
5 django/core/management/base.py
View
@@ -247,8 +247,9 @@ def execute(self, *args, **options):
else:
self.stderr.write(smart_str(self.style.ERROR('Error: %s\n' % e)))
sys.exit(1)
- if saved_lang is not None:
- translation.activate(saved_lang)
+ finally:
+ if saved_lang is not None:
+ translation.activate(saved_lang)
def validate(self, app=None, display_num_errors=False):
"""
Please sign in to comment.
Something went wrong with that request. Please try again.